Browse Source

minor fixes

master
rozetko 4 years ago
parent
commit
da334b9410
  1. 1
      analytics/config.py
  2. 5
      analytics/server.py

1
analytics/config.py

@ -35,6 +35,7 @@ HASTIC_SERVER_URL = get_config_field('HASTIC_SERVER_URL', 'ws://localhost:8002')
LOGGING_LEVEL = get_config_field( LOGGING_LEVEL = get_config_field(
'HS_AL_LOGGING_LEVEL', 'HS_AL_LOGGING_LEVEL',
'INFO', 'INFO',
# TODO: make values case insensitive
['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'] ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL']
) )
LEARNING_TIMEOUT = get_config_field('LEARNING_TIMEOUT', 120) LEARNING_TIMEOUT = get_config_field('LEARNING_TIMEOUT', 120)

5
analytics/server.py

@ -86,10 +86,9 @@ async def app_loop():
def run_server(): def run_server():
loop = asyncio.get_event_loop() loop = asyncio.get_event_loop()
#loop.set_debug(True)
logger.info("Ok") logger.info("Ok")
init_services() init_services()
logger.info('Analytics process is running') # we need to print to stdout and flush logger.info('Analytics process is running')
sys.stdout.flush() # because node.js expects it
loop.run_until_complete(app_loop()) loop.run_until_complete(app_loop())

Loading…
Cancel
Save