Skip to content

fix worker_result.py: updated WorkerResultSuccess to pass through var… #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

BenArayathel
Copy link

Adding a fix to WorkerResultSuccess to pass through variables.

@vzickner
Copy link
Collaborator

Hi @BenArayathel,

thanks for the PR.
The idea behind the builder is not to pass through the variables coming from the request. Your library should use the input variables, do some computation based on it and then provide new result variables.

Therefore, you can use the methods of the WorkResultWithVariables (that's a parent class) to add new result variables which you can then use as part of the process, e.g.:

return work_result_builder.success().variable_string('myResultVar', 'My value')

Multiple, variables can be added with a loop or by just calling more variable_... methods.

I'm closing the PR for now since that's not what it is intended for. Let us know if you have any questions or in case I am missing something.

I hope this helps,

Valentin

@vzickner vzickner closed this Jul 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants