Skip to content

Commit

Permalink
Second attempt at satisfying python
Browse files Browse the repository at this point in the history
  • Loading branch information
RodoMa92 committed Aug 28, 2024
1 parent 0e6fe37 commit a5985c2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion backend/decky_loader/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,10 @@ async def inject_javascript(self, tab: Tab, first: bool=False, request: Request|
def run(self):
run_app(self.web_app, host=get_server_host(), port=get_server_port(), loop=self.loop, access_log=None, handle_signals=True, shutdown_timeout=40)

def handle_systemd():
PluginManager.shutdown()
pass

def main():
setproctitle(f"Decky Loader {get_loader_version()} ({getproctitle()})")
setthreadtitle("Decky Loader")
Expand All @@ -262,7 +266,7 @@ def main():
#Catch a sigint (CTRL-C) coming from systemd and shut down gracefully
#TODO: Handle the Windows case in the future
if ON_LINUX:
signal.signal(signal.SIGINT, PluginManager.shutdown)
signal.signal(signal.SIGINT, handle_systemd)

logger.info(f"Starting Decky version {get_loader_version()}")

Expand Down

0 comments on commit a5985c2

Please sign in to comment.