1
Fork 0
mirror of https://github.com/Steffo99/greed.git synced 2025-03-13 12:17:27 +00:00

Add callback switcher

This commit is contained in:
Darren 2020-01-28 16:40:31 +02:00
parent 89092c6f3e
commit a32c9e3148

11
core.py
View file

@ -175,14 +175,13 @@ def callback():
# check config for use_websocket
use_websocket = configloader.config["Bitcoin"]["use_websocket"]
if use_websocket == True:
# Run the main bot in thread
if use_websocket == "False":
threading.Thread(target=main).start()
if __name__ == "__main__":
if use_websocket == True:
# Run the main bot in the main process
main()
else:
if use_websocket == "False":
# Run the flask app in the main process
app.run()
else:
# Run the main bot in the main process
main()