Comments (6)
is it possible that the qless-core API is already a little crowded? REDIS itself implements many specific (short) methods to do specific things. qless-core seems to have a few methods that do many things, depending on the parameters you send them.
from qless.
Doesn't Qless already support replacing an existing job if you put a new one with the same jid? I've been using that for a while.
Not sure what you mean by "not replacing" a job with the same jid--if you're putting a job with the jid of an existing job, what else would it do?
from qless.
There's two approaches you could take when placing a job and there's already one in queue:
- Delete the job you're placing (not place it) and leave the existing one
- Delete the existing job and place the new one.
Both are useful depending on the application.
Eg: cache regeneration would use #1, but list sort order changing would use #2
- Steven Soroka
On 2012-10-08, at 10:42 PM, Myron Marston [email protected] wrote:
Doesn't Qless already support replacing an existing job if you put a new one with the same jid? I've been using that for a while.
Not sure what you mean by "not replacing" a job with the same jid--if you're putting a job with the jid of an existing job, what else would it do?
—
Reply to this email directly or view it on GitHub.
from qless.
Delete the job you're placing (not place it) and leave the existing one
Honestly, I have a hard time seeing how this would ever be desired behavior. It sounds too much like "silent failure". If Qless isn't going to do what you ask (e.g. put the job), then it would seem preferable to raise an error, and the you're code could always rescue it and ignore it.
Can you explain a bit more about your cache regeneration use case? My use case of Qless may just be entirely different.
Also, I feel like #put
should have the same semantics as an HTTP PUT (e.g. idempotent create or replace).
from qless.
#1 is common: any throttling code typically does exactly this. The first request goes through and the rest don't until the first is processed. If you're doing some slow task in the background, it's not out of date until the first one you asked for completes, and other requests are redundant and superfluous. Because this has to happen atomicly, a simple check first to see if the record is in the queue isn't good enough.
from qless.
Idempotent enqueuing (1.) is something I'm also interested in. I have an upstream slow, durable dumb queue that I'd like to feed into my qless (actually plines) installation. We're still feeling out if we want a push or a pull connecting them, but a batch push would certainly want idempotency to avoid clobbering jobs in flight.
from qless.
Related Issues (20)
- Forking worker unable to gracefully exit HOT 2
- InvalidByteSequenceError HOT 2
- Fast way to clear queue HOT 1
- Redis Cluster support HOT 1
- `Qless::Queue#peek` not returning correct results for recurring jobs HOT 5
- After sending pause signal (USR2) SerialWorker performs a job before it actually pauses
- RubyGem executables now go in exe HOT 1
- Custom JID option is not recognized when provided as string HOT 2
- Do not use CDN versions of JavaScript scripts HOT 6
- Lua Script Error on Redis 3.2 HOT 3
- other bindings
- Process SIGINT as SIGQUIT
- Incorrect documentation about signal handlers
- Floods of automated messages HOT 2
- Problems running web UI on startup HOT 4
- Purge old failed jobs HOT 1
- Get queue count outside of UI HOT 6
- Can't delete/timeout jobs via Web UI HOT 8
- Web App uses ~40 connections for a single request?? HOT 1
- Fails on redis 6.2.7 and redis 7.0 due to global lua tables becoming read only
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 qless.