fix: push the generation of a vote report to the queue #882
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.
Summary
https://app.clickup.com/t/mz7m2y
The CLI command previously did not push the
GenerateVoteReport
job to the queue, which made it run in an existing lifecycle when scheduler is ran. Due to the fact that the vote generation can take quite some time, I assume the command could fail and app would terminate, resulting in a bash script not running to completion.Disclaimer
Laravel Horizon is currently configured (and its corresponding queue connection) to timeout after 90s. If the job takes more than that, the job would fail with
MaxAttemptsExceededException
. As discussed in the ClickUp task, as there are no metrics how long the script takes on average, we agreed to just push it to the queue then act on it (increase the timeout) if we receive an error that the script has taken too long. In that case, we don't have to reconfigure the queue if the script takes less than that.Checklist