Allow specific kinds for sequences
We currently have the following options for sequences:
return riverpro.SequenceOpts{
ByArgs: true,
ContinueOnCancelled: true,
ContinueOnDiscarded: true,
ByQueue: false,
ExcludeKind: true,
}
By default, sequences are enforced for each job kind unless we set ExcludeKind: true, so they are enforced across all job kinds. It would be nice to have an IncludedKinds []JobArgs parameter so we can specify a list of kinds we want to include for the sequence instead of having to do everything or just one.
For example, I have the jobs user:add, user:update, user:delete, user:process jobs, but I only want one of these to be running at any given time. Right now, you would need to have a single user:operate to achieve that.
Hi @dragondgold! Yes, I believe this should be possible and fairly straightforward to add. I'm thinking it would take precedence over ExcludeKind—does that sound right to you?
Hi @dragondgold! Yes, I believe this should be possible and fairly straightforward to add. I'm thinking it would take precedence over
ExcludeKind—does that sound right to you?
Indeed, taking precedence over ExcludeKind sounds good