Low priority and high priority workflow queues #177
-
Hi there. We have the following situation: we are using the same workflow and activities classes in two situations. In one case, the workflow is triggered by a scheduled command, and in the other case by a user action. If the workflow is triggered by user action, I want to run the workflow and all child workflows/activities on a high priority queue. If the are triggered by the scheduled command, I want them to run on a low priority queue. Is this currently possible with built-in features of laravel-workflow? One solution I came up with is to extend the base workflow and activity classes so the parent workflows receive the queue they should run on and inject it to every child workflow and activity they spawn. But maybe someone knows an easier way? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Your approach sounds reasonable. Another option would be to extend your
The downside is they are technically different workflows but using the same base logic. |
Beta Was this translation helpful? Give feedback.
Your approach sounds reasonable. Another option would be to extend your
MyWorkflow
withMyWorkflowHigh
andMyWorkflowLow
and then inside of each you set:The downside is they are technically different workflows but using the same base logic.