fix: daemon mode wasn't reporting progress - #264
Merged
Conversation
Signed-off-by: Morgan Epp <60796713+epmog@users.noreply.github.com>
leongdl
approved these changes
Jun 17, 2026
seant-aws
reviewed
Jun 17, 2026
There was a problem hiding this comment.
this is just purely for testing right ?
seant-aws
approved these changes
Jun 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #109
What was the problem/requirement? (What/Why)
In daemon mode, update_status() in
BaseAdaptorwroteopenjd_progress:andopenjd_status:messagesdirectly to stdout via
sys.stdout.write(). However, the background process's stdout is redirected to abootstrap output file and the logging stream handler is replaced with a LogBufferHandler.
Since sys.stdout.write() bypasses the logging framework entirely, progress/status messages never reached the log buffer, never got sent to the foreground via heartbeats, and the worker agent never saw them. Therefore no progress updates in any service.
sequenceDiagram participant App as Application participant BG as Background Adaptor Process participant LB as LogBufferHandler participant FG as Foreground Adaptor Process participant WA as Worker Agent App->>BG: stdout: "Rendering 50 percent" BG->>BG: RegexHandler detects progress<br/>calls update_status(progress=50) BG--xBG: sys.stdout.write("openjd_progress: 50")<br/>fd 1 points to bootstrap file, nobody reads it Note over LB: LogBuffer never receives the message Note over FG: Heartbeat response has no progress data Note over WA: Never sees openjd_progress: 50The run command worked fine because the process's stdout is directly monitored by the worker agent.
What was the solution? (How)
Changed update_status() to route messages through the logger at _ADAPTOR_OUTPUT_LEVEL instead of writing to sys.stdout directly.
sequenceDiagram participant App as Application participant BG as Background Adaptor Process participant LB as LogBufferHandler participant FG as Foreground Adaptor Process participant WA as Worker Agent App->>BG: stdout: "Rendering 50 percent" BG->>BG: RegexHandler detects progress<br/>calls update_status(progress=50) BG->>LB: _logger.log(ADAPTOR_OUTPUT,<br/>"openjd_progress: 50") LB->>FG: Heartbeat response carries<br/>buffered output via socket FG->>FG: _logger.log(ADAPTOR_OUTPUT,<br/>"openjd_progress: 50") FG->>WA: StreamHandler writes to stdout<br/>"openjd_progress: 50" Note over WA: Worker agent detects progressThis works in both modes:
messages without the level prefix — identical behavior to before.
frontend logs it at _ADAPTOR_OUTPUT_LEVEL through its own stdout stream handler → worker agent sees it.
What is the impact of this change?
Progress and status messages now correctly propagate from background adaptors to the worker agent in daemon mode. No change in behavior for run mode.
How was this change tested?
Added a new integration test (test_progress_in_background_mode.py) that:
Updated existing unit tests in test_base_adaptor.py to use caplog instead of capsys since messages now go through the logger. All existing integration tests (test_integration_entrypoint.py, test_background_mode.py) pass.
I also tested this manually in deadline-cloud with an updated adaptor for Blender.
Before
After
Was this change documented?
N/A
Is this a breaking change?
Fixing!
Does this change impact security?
N/A
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.