Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging supervisor's child process logs #588

Merged
merged 3 commits into from
Mar 2, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 2 additions & 1 deletion server/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ autotest_server/testers/java/lib/
.idea
__pycache__
.DS_Store
.hypothesis/
.hypothesis/
supervisor_child_log/
8 changes: 8 additions & 0 deletions server/start_stop.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@
autorestart=true
stopasgroup=true
killasgroup=true
stdout_logfile={stdout_logfile}
stdout_logfile_maxbytes=1MB
stdout_logfile_backups=10
stderr_logfile={stderr_logfile}
stderr_logfile_maxbytes=1MB
stderr_logfile_backups=10

"""

Expand All @@ -57,6 +63,8 @@ def create_enqueuer_wrapper(rq):
queues=" ".join(worker_data["queues"]),
numprocs=1,
directory=os.path.dirname(os.path.realpath(__file__)),
stdout_logfile=os.path.join(_THIS_DIR, f'supervisor_child_log/{worker_data["user"]}_stdout.log'),
stderr_logfile=os.path.join(_THIS_DIR, f'supervisor_child_log/{worker_data["user"]}_stderr.log'),
)
f.write(c)

Expand Down
Loading