From 561cae80ef2be1abe16332bcd85329f538eece81 Mon Sep 17 00:00:00 2001 From: Leonardo Barcaroli Date: Tue, 5 Mar 2019 15:01:09 +0100 Subject: [PATCH] Fix daemon start not in debug mode. --- bot_z/zdaemon.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bot_z/zdaemon.py b/bot_z/zdaemon.py index b1a9368..48ee90c 100644 --- a/bot_z/zdaemon.py +++ b/bot_z/zdaemon.py @@ -12,6 +12,7 @@ import queue import signal import sys import threading +import time import typing as T from bot_z.bot_z import Operator @@ -227,7 +228,9 @@ def daemon_process( os.remove(lifo_path) return with context: - logger.debug("Started in background") + # This is necessary to trigger the daemon start. + time.sleep(1) + logger.info("Started in background") try: listen_commands(lifo_path, fifo_path, cmd_map) except StopDaemon: