Closed jadedarko closed 1 year ago
I have a fix for this, PR #28
Basically what I was seeing is the child log lines would be bunched up and wouldn't appear until the parent process had something to log (which issued a flush).
By adding the flush in these two callbacks, log lines from the child process appear straight away.
Again visiting this, maybe this should be optional ? like SINGLE_BEAT_UNBUFFERED=1
and flush at each line, because on the other hand, we are doing a double buffering (if that is a correct term), as in, child might be wanting to flush each line and we'd be buffering.
@robvdl What do you think about putting it into a config env. variable ? and making it optional ?
Sounds good to me, I don't mind making it optional.
Also flushing every line I don't think is a problem because:
1) beat doesn't log much at all 2) when it does, it always logs one line anyway "invoke task xyz"
Just my 2c
Wouldn't the solution here be to "simply" run the child process in unbuffered mode?
Is stdout for the child beat instance is only printed on termination of the parent single-beat instance?
I couldn't see a way to show this output, meaning my journalctl logs don't show task scheduling.
Is there a way to always print celery output in realtime to stdio?