FOUR-21497 - Fix script retry error handling for script microservice#7926
Closed
nolanpro wants to merge 4 commits intorest-script-runner-2025-winterfrom
Closed
FOUR-21497 - Fix script retry error handling for script microservice#7926nolanpro wants to merge 4 commits intorest-script-runner-2025-winterfrom
nolanpro wants to merge 4 commits intorest-script-runner-2025-winterfrom
Conversation
epdl
requested changes
Jan 24, 2025
ProcessMaker/Jobs/RunScriptTask.php
Outdated
| ], | ||
| ]; | ||
| $response = $script->runScript($data, $configuration, $token->getId(), $errorHandling->timeout(), 0, $metadata); | ||
| $response = $script->runScript($data, $configuration, $token->getId(), $errorHandling->timeout(), 1, $metadata); |
Contributor
There was a problem hiding this comment.
@nolanpro here we are forcing this to be sync. This is not the idea, we should control this in the callback response.
Contributor
Author
There was a problem hiding this comment.
@epdl in that case, should we remove ProcessMaker/Jobs/RunScriptTask.php and make this entirely synchronous from core's point of view? Do you see any point in using horizon/queues in core for scripts? Queueing one job that queues another job would make the process error prone
|
Contributor
Author
|
Closing in favor of #7949 |
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.




Issue & Reproduction Steps
Script retries were not working with the new microservice
Solution
Changed Async to Sync
In the rest-script-runner-2025-winter branch,
$syncparam is false when running async script tasks. This results in 2 async processesRun Script -> Async Job -> Run Microservice Script -> Run Async on MicroserviceThis would complicate the Retry error handling logic and I believe it's unnecessary and could result in additional complexity in the life cycle.
So in this PR I changed it to sync so the original retry logic works the same as it did previously.
How to Test
See jira issue
Related Tickets & Packages
Code Review Checklist