Skip to content

Don't buffer output #12

Description

@gerhard4

Somewhere in the way the worker tasks are called, their output is captured, buffered, and then written. This has three consequences:

  1. This only seems to capture stdout. stderr seems to be dropped silently.
  2. 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.
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions