Beispiel #1
0
    }

    sentiment_process = Process(target=flyonthewall.run_search,
                                args=arguments,
                                kwargs=keyword_arguments,
                                name='sentiment_analysis_test')

    sentiment_process.start()
    """
    sentiment_results = flyonthewall.run_search(exchange=sample_exchange, market=sample_market,
                                                slack_channel=sample_slack_channel, slack_thread=sample_slack_thread,
                                                positive_sentiment_threshold=0.682, negative_sentiment_threshold=0.682,
                                                purge_old_data=True)
    """

    while (sentiment_process.is_active()):
        logger.info('Doing other stuff...')

        time.sleep(1)

    logger.info('Joining process to confirm completion and exit cleanly.')

    sentiment_process.join()

    print('SENTIMENT RESULTS:')
    pprint(sentiment_results)

    logger.debug('Last Updated: ' + str(flyonthewall.last_updated))

    logger.debug('Done.')