diff --git a/rootfs/etc/s6-overlay/scripts/webapp b/rootfs/etc/s6-overlay/scripts/webapp index 12141368..57d97f6c 100755 --- a/rootfs/etc/s6-overlay/scripts/webapp +++ b/rootfs/etc/s6-overlay/scripts/webapp @@ -14,7 +14,7 @@ if [[ ${ENABLE_WEB,,} =~ true ]]; then -b "0.0.0.0:8888" \ -w 1 \ --no-sendfile \ - -k eventlet \ + -k gevent \ acarshub:app \ --timeout 120 \ 2>&1 | stdbuf -oL sed --unbuffered '/^$/d' | \ diff --git a/rootfs/webapp/acarshub.py b/rootfs/webapp/acarshub.py index 3346da98..1bdf054b 100755 --- a/rootfs/webapp/acarshub.py +++ b/rootfs/webapp/acarshub.py @@ -16,9 +16,6 @@ # You should have received a copy of the GNU General Public License # along with acarshub. If not, see . -import eventlet - -eventlet.monkey_patch() import acarshub_helpers # noqa: E402 import acarshub_configuration # noqa: E402 import acarshub_logging # noqa: E402 @@ -362,14 +359,14 @@ def message_listener(message_type=None, ip="127.0.0.1", port=None): acarshub_logging.log( "Reassembly successful, message not skipped after all!", f"{message_type.lower()}Generator", - level=LOG_LEVEL["DEBUG"] + level=LOG_LEVEL["DEBUG"], ) except Exception as e: # reassembly didn't work, don't do anything but print an error when debug is enabled acarshub_logging.log( f"Reassembly failed {e}: {combined}", f"{message_type.lower()}Generator", - level=LOG_LEVEL["WARNING"] + level=LOG_LEVEL["WARNING"], ) # forget the partial message, it can't be useful anymore @@ -389,7 +386,9 @@ def message_listener(message_type=None, ip="127.0.0.1", port=None): # last element in the list, could be a partial json object partial_message = part acarshub_logging.log( - f"Skipping Message: {part}", f"{message_type.lower()}Generator", LOG_LEVEL["DEBUG"] + f"Skipping Message: {part}", + f"{message_type.lower()}Generator", + LOG_LEVEL["DEBUG"], ) continue except Exception as e: @@ -432,9 +431,7 @@ def message_listener(message_type=None, ip="127.0.0.1", port=None): if not acarshub_configuration.QUIET_MESSAGES: print(f"MESSAGE:{message_type.lower()}Generator: {msg}") - client_message = generateClientMessage( - que_type, formatted_message - ) + client_message = generateClientMessage(que_type, formatted_message) # add to recent message que for anyone fresh loading the page list_of_recent_messages.append(client_message) @@ -460,9 +457,11 @@ def init_listeners(special_message=""): # show log message if this is container startup acarshub_logging.log( - "Starting Data Listeners" - if special_message == "" - else "Checking Data Listeners", + ( + "Starting Data Listeners" + if special_message == "" + else "Checking Data Listeners" + ), "init", level=LOG_LEVEL["INFO"] if special_message == "" else LOG_LEVEL["DEBUG"], ) diff --git a/rootfs/webapp/requirements.txt b/rootfs/webapp/requirements.txt index 1c558a75..3aba3189 100644 --- a/rootfs/webapp/requirements.txt +++ b/rootfs/webapp/requirements.txt @@ -1,7 +1,7 @@ -eventlet==0.37.0 Flask==3.0.3 Flask-SocketIO==5.4.1 -gunicorn[eventlet]==23.0.0 +gevent==24.10.3 +gunicorn[gevent]==23.0.0 requests==2.32.3 rrdtool==0.1.16 schedule==1.2.2