mrc-ide / rrq

:runner::runner::runner: Lightweight Redis queues
https://mrc-ide.github.io/rrq/
Other
24 stars 4 forks source link

Enable task logging #122

Closed richfitz closed 2 months ago

richfitz commented 2 months ago

This PR enables per-task logging.

There are two prerequisites for using this:

The latter is not on by default but it could be. It will work generally quite well in places where the worker and controller share a filesystem, and poorly otherwise.

When logging is enabled, we add a logfile key at task start, and update the call to callr::r_bg to stream both stdout and stderr there. You can then use rrq_task_log() to read the contents.