Skip to content

Commit fb76c34

Browse files
author
szwerver
committed
use something else than development server
1 parent b575f7e commit fb76c34

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

CommunicationHandler.py

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ def __init__(self):
2121

2222
def update(self): # functions that need to be checked regularly
2323
while True:
24+
print('[comHandler]')
2425
# self.send_friendly_request()
2526
self.receive_tournament_update()
2627

data/schedule.db

0 Bytes
Binary file not shown.

main.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from CommunicationHandler import CommunicationHandler
66
import threading
77
import json
8+
from waitress import serve
89

910
app = Flask(__name__)
1011
app.config["DEBUG"] = False
@@ -24,6 +25,7 @@
2425
###############################################################
2526
@app.route('/', methods=['GET', 'POST'])
2627
def index():
28+
print('[index]')
2729
return render_template('home.html')
2830

2931

@@ -202,7 +204,8 @@ def request_overview():
202204
############################# RUN #############################
203205
###############################################################
204206
update_thread = threading.Thread(target=commHandler.update)
205-
# update_thread.start()
207+
update_thread.start()
206208

207-
app.run(host='0.0.0.0')
208-
# update_thread.join()
209+
serve(app, host="0.0.0.0", port=5000)
210+
# app.run(host='0.0.0.0')
211+
update_thread.join()

0 commit comments

Comments
 (0)