Comments (4)
I can't find any functions in here to support adding jobs like this, however it does look as though these jobs will be processed, by the scheduler.
from go-workers.
Hey all, just noticed this ticket, sorry for lack of a response.
There is currently support for polling from scheduled jobs, but it's currently only looking at the retry queue for failed jobs (which get retried with exponential backoff). Therefore, you cannot enqueue scheduled jobs or process scheduled jobs enqueued with perform_at
or perform_in
with go-workers at the moment.
Anytime you use perform_at
or perform_in
with Sidekiq, your job is added to a sorted set with the key schedule
. So, processing of scheduled jobs with go-workers would be as simple as telling the scheduler to poll the schedule
key in addition to the retry key.
Enqueuing schedule jobs would need to modify the enqueue method to take an at
option which, if present, would cause the job to be added to the schedule
key.
I don't have any time to work on this at the moment, but this is a feature I've been planning on implementing and will need at some point in the future.
Would happily work with someone who wants to send in a pull request.
Cheers,
John
from go-workers.
I'm new to Go, but I'm pretty competent in a lot of other languages so should be able to handle this.
If I'm not mistaken then what you're saying is that all we need to do to process scheduled jobs is simply include the schedule
key here:
https://github.com/jrallison/go-workers/blob/master/workers.go#L19
That would allow us to start processing the scheduled jobs because the scheduler already accepts multiple keys and selects over them (https://github.com/jrallison/go-workers/blob/master/scheduled.go#L35).
from go-workers.
Yep, that looks correct. The more involved change is the ability to enqueue scheduled jobs, but I think there's value in just processing scheduled jobs enqueued via a sidekiq client in ruby as well.
from go-workers.
Related Issues (20)
- Pass Redis connection Configure
- queue is not FIFO, but LIFO actually.. HOT 1
- Unnecessary logic in func EnqueueWithOptions
- gospec moved to github.com/customerio/gospec/src/gospec
- What's the meaning of "Class" property in EnqueueData? HOT 3
- How to use enqueue_in (from ruby TO go) HOT 1
- Configuring multiple REDIS servers HOT 3
- Retry options HOT 2
- Application server concurrency HOT 4
- need more guides HOT 1
- Scheduled jobs being "lost" HOT 2
- Run jobs synchronously
- Retry Jobs Not Showing in Sidekiq Retry List in Web UI HOT 1
- Contributors HOT 3
- Monitoring worker
- Enqueue using a Redis pipeline?
- EnqueueIn and EnqueueWithOptions with At
- ActiveJob Issues
- Error & Retry
- question: support for go modules
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-workers.