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:
parent
89092c6f3e
commit
a32c9e3148
1 changed files with 5 additions and 6 deletions
11
core.py
11
core.py
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue