GraphQl 0.125 - Threading issues

This commit is contained in:
jokob-sk
2024-11-15 23:27:26 +11:00
parent 60492157d1
commit 70e0542488
5 changed files with 80 additions and 85 deletions

View File

@@ -41,12 +41,13 @@ def graphql_endpoint():
def start_server():
"""Function to start the GraphQL server in a background thread."""
mylog('verbose', [f'[graphql_server] Starting on port: {GRAPHQL_PORT}'])
state = updateState("GraphQL: Starting", None, None, None, None)
if state.graphQLServerStarted == 0:
mylog('verbose', [f'[graphql_server] Starting on port: {GRAPHQL_PORT}'])
# Start the Flask app in a separate thread
thread = threading.Thread(target=lambda: app.run(host="0.0.0.0", port=GRAPHQL_PORT, debug=True, use_reloader=False))
thread.start()