Considerations for jobs that depend on events received
- Dominant language
- JavaScript
- Stars
- 9.4k
- Forks
- 858
- PR merge metrics
- No merged PRs in 30d
Description
This is a great lib, thanks for building it!
This is not so much an issue, but I'd like to check if anyone knows if kue can/should be used in a particular use case I have, or if there is a different tool I should be using.
The scenarios is:
A 'job' depends on particular events being received for it to complete.
There may be multiple apps in the cluster - so there we can't guarantee that a kue worker running on one app is the one that receives the event that completes the job. So I can't use queue.process to handle the job.
To get around this, I've considered not using queue.process at all, but instead using 'rangeByType' every time an event is received and updating the job to complete if the event indicates that the job is complete.
This would work, but using utility methods like this as part of the business logic feels hacky. This pattern can't be that uncommon though - so any thoughts or considerations very welcome.
Thanks!
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading the queue.process and rangeByType APIs mentioned in the issue, along with Kue's job-completion behavior. Determine whether event-dependent completion is supported by the existing API; done would require a maintainer-approved, scoped change or documented guidance on the appropriate pattern.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js, redis
- Domain
- backend, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100