From 8ab42b844b32f333167efbe991b0a4bc86e5270f Mon Sep 17 00:00:00 2001 From: krateng Date: Mon, 3 Jan 2022 20:45:55 +0100 Subject: [PATCH] Removed shutdown handling --- maloja/server.py | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/maloja/server.py b/maloja/server.py index f64e83f..5140cda 100644 --- a/maloja/server.py +++ b/maloja/server.py @@ -1,6 +1,5 @@ # technical import sys -import signal import os from threading import Thread import setproctitle @@ -265,27 +264,6 @@ def redirect_track(artists,title): redirect("/track?title=" + title + "&" + "&".join("artist=" + artist for artist in artists.split("/"))) -###### -### SHUTDOWN -##### - - -def graceful_exit(sig=None,frame=None): - #urllib.request.urlopen("http://[::1]:" + str(DATABASE_PORT) + "/sync") - log("Received signal to shutdown") - try: - database.sync() - except Exception as e: - log("Error while shutting down!",e) - log("Server shutting down...") - sys.exit(0) - -#set graceful shutdown -signal.signal(signal.SIGINT, graceful_exit) -signal.signal(signal.SIGTERM, graceful_exit) - - - ######