From 69b7914d9ef44f4da868cf7cf1962c7542a602fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20S=C3=A1nchez?= Date: Sat, 7 Dec 2024 17:58:01 -0300 Subject: [PATCH] proper WSGI server --- changelog.txt | 3 +++ main.py | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/changelog.txt b/changelog.txt index d7cd1dd..40f9828 100755 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,6 @@ +2024.12.07: +. Switch to a proper WSGI server (waitress) + 2024.12.04: . Proper missing bak file handling on switch_to_long. diff --git a/main.py b/main.py index 342b31d..ba277b0 100644 --- a/main.py +++ b/main.py @@ -4,6 +4,7 @@ import os import sys import time from threading import Thread +from waitress import serve import sqlite3 import ccxt @@ -22,7 +23,7 @@ In case the permissions of the certificate changes, reset them this way: # ll /etc/letsencrypt/ ''' -version = "2024.12.04" +version = "2024.12.07" ''' Color definitions. If you want to change them, check the reference at https://en.wikipedia.org/wiki/ANSI_escape_code#Colors @@ -1264,7 +1265,8 @@ def reload_safety_order(): def run_API(): - base_api.run(host="0.0.0.0", port=broker.get_config()["port"]) + serve(base_api, host="0.0.0.0", port=broker.get_config()["port"]) + #base_api.run(host="0.0.0.0", port=broker.get_config()["port"])