Somewhere in the way the worker tasks are called, their output is captured, buffered, and then written. This has three consequences:
- This only seems to capture
stdout. stderr seems to be dropped silently.
- Even if the task code prints the logs in the correct order, the code that captures that then prints it in a wrong order. Imagine 6 log messages with IDs 11, 12, 13, 21, 22, 23, printed in this order. What I see (from most recent to oldest) is "21, 22, 23, 11, 12, 13" and not the expected "23, 22, 21, 13, 12, 11". This is because the output buffering and then printing it in batches.
- The output lines are prefixed with the R prefixes "[1]" etc. They allow at least to find the batches and then read them in the correct order, but better would be if they were in the correct order to start with.
The output should not be buffered, and it probably should also forward stderr. Also, adding the R prefixes like "[1]" don't seem to be necessary.
Somewhere in the way the worker tasks are called, their output is captured, buffered, and then written. This has three consequences:
stdout.stderrseems to be dropped silently.The output should not be buffered, and it probably should also forward
stderr. Also, adding the R prefixes like "[1]" don't seem to be necessary.