Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a comprehensive "daemon mode" for running tasks in non-interactive or supervised environments (such as supervisor, systemd, or nohup). The changes ensure that the application automatically detects when it's running without a TTY and disables interactive features, enforces line-buffered output, and switches subprocesses to PIPE mode for maximum compatibility and clean logging. The documentation is updated to explain usage and configuration for daemon mode, including supervisor and systemd examples.
Key changes include:
Daemon Mode Implementation:
--daemonCLI flag and automatic detection of non-TTY environments to enable daemon mode, which disables interactive features (like Rich Live panel and terminal title updates), forces PIPE subprocess mode, and ensures line-buffered output for compatibility with supervisors and logging systems (task_runner/cli.py,task_runner/commands/run_cmd.py,task_runner/display/core.py). [1] [2] [3]is_daemon_mode,enable_daemon_mode,auto_detect_daemon_mode) for use across modules (task_runner/display/__init__.py). [1] [2]task_runner/display/core.py,task_runner/display/tracker.py). [1] [2] [3] [4]Executor and Output Handling:
task_runner/executor.py). [1] [2] [3] [4] [5] [6]Documentation Updates:
docs/USER_GUIDE.md). [1] [2] [3] [4]README.mdto mention daemon mode support.