Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion code_review_graph/daemon_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

def _handle_start(args: argparse.Namespace) -> None:
"""Start the daemon process."""
from .daemon import WatchDaemon, is_daemon_running, load_config
from .daemon import WatchDaemon, is_daemon_running, load_config, write_pid

if is_daemon_running():
print("Error: Daemon is already running.")
Expand All @@ -42,6 +42,9 @@ def _handle_start(args: argparse.Namespace) -> None:

if not args.foreground:
daemon.daemonize()
else:
write_pid()
daemon._setup_signal_handlers()

daemon.run_forever()

Expand Down