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