mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-14 21:38:38 +00:00
More logging
This commit is contained in:
@@ -23,6 +23,7 @@ def answer_external_command():
|
||||
# 200,
|
||||
#)
|
||||
#return return_data
|
||||
app.logger.info("DATA RECEIVED")
|
||||
IN_COMM_Q.put("Test")
|
||||
return jsonify("SUCCESS")
|
||||
|
||||
@@ -48,10 +49,10 @@ def waitress_run(_logger):
|
||||
_logger.info("Attempt waitress")
|
||||
serve(app, host=HOST_ADDRESS, port=PORT_ADDRESS)
|
||||
|
||||
def scan_queue():
|
||||
def scan_queue(_logger):
|
||||
while True:
|
||||
data = OUT_COMM_Q.get()
|
||||
print(data)
|
||||
_logger.info(data)
|
||||
IN_COMM_Q.put("Test")
|
||||
|
||||
|
||||
@@ -61,7 +62,7 @@ def comm_subroutine(logger):
|
||||
threads = []
|
||||
#threads.append(threading.Thread(target=flask_debug, args=(logger,)))
|
||||
threads.append(threading.Thread(target=waitress_run, args=(logger,)))
|
||||
threads.append(threading.Thread(target=scan_queue,))
|
||||
threads.append(threading.Thread(target=scan_queue,args=(logger,)))
|
||||
|
||||
for worker in threads:
|
||||
worker.start()
|
||||
|
||||
Reference in New Issue
Block a user