mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-14 21:38:38 +00:00
Attempt 3
This commit is contained in:
@@ -2237,12 +2237,12 @@ def flask_debug(_logger):
|
||||
app.run(debug=True, use_reloader=False, host=HOST_ADDRESS, port=PORT_ADDRESS, logger=_logger)
|
||||
|
||||
|
||||
def waitress_run():
|
||||
def waitress_run(_logger):
|
||||
"""
|
||||
The `waitress_run` function serves the `app` on host "0.0.0.0"
|
||||
and port 5000 using the Waitress WSGI server.
|
||||
"""
|
||||
serve(app, host=HOST_ADDRESS, port=PORT_ADDRESS)
|
||||
serve(app, host=HOST_ADDRESS, port=PORT_ADDRESS, logger=_logger)
|
||||
|
||||
|
||||
# *================================== Run
|
||||
@@ -2250,9 +2250,9 @@ if __name__ == "__main__":
|
||||
# TODO: wpakowac kondzia w wąteki odpalic asynchronicznie rownolegle z flaskiem do sterowania nim
|
||||
logger.info("Starting discord bot")
|
||||
threads = []
|
||||
#threads.append(threading.Thread(target=waitress_run))
|
||||
threads.append(threading.Thread(target=flask_debug, args=(logger,)))
|
||||
#threads.append(threading.Thread(target=client.run, args=(TOKEN,)))
|
||||
threads.append(threading.Thread(target=waitress_run, args=(logger,)))
|
||||
#threads.append(threading.Thread(target=flask_debug, args=(logger,)))
|
||||
threads.append(threading.Thread(target=client.run, args=(TOKEN,)))
|
||||
i = 0
|
||||
for worker in threads:
|
||||
logger.info(i)
|
||||
|
||||
Reference in New Issue
Block a user