Repository navigation
feat: Support run log redirection in TaskClient.call - #1252
Merged
Merged
Conversation
`TaskClient.call` accepts the same `logger` argument as `ActorClient.call` and redirects the run's log and status messages to it while waiting for the run to finish. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ocuAL9oK2rVWgWZKeeVVg
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1252 +/- ##
==========================================
- Coverage 95.68% 95.66% -0.03%
==========================================
Files 65 65
Lines 6770 6798 +28
==========================================
+ Hits 6478 6503 +25
- Misses 292 295 +3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
TaskClient.callTaskClient.call
Pijukatel
marked this pull request as ready for review
November 25, 2026 08:19
This was referenced Nov 25, 2026
vdusek
reviewed
Nov 27, 2026
TaskClient.calllogger argument to TaskClient.call for run log redirection
logger argument to TaskClient.call for run log redirectionTaskClient.call
`ActorClient.call` and `TaskClient.call` start the run before they set up log redirection, which reads the run and its Actor. A failure there, for example a token that may run a task but not read its Actor, made `call` raise and lose the started run. It is now logged as a warning and the run is waited for without redirection. Also moves `_wait_with_logs` after the public methods, fixes the task `logger` docstring, and adds task tests for `logger='default'` and `logger=None`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ocuAHA5qh4VqF6Ps7XR5p
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.
TaskClient.calltakes the sameloggerasActorClient.call. The default'default'redirects the run's log and status messages, andcallreturns ~6 s after the run finishes. Passlogger=Noneto opt out.calllogs a warning and still waits for and returns the run.Actor.call_taskapify-sdk-python#1275 before releasing this, becauseActor.call_taskcallstask.call()withoutlogger.TaskClient.call()apify-client-js#1237