Comments (3)
You can look at the exq_ui project for sample usage. Failed jobs are stored as ZSET in redis and without score, a full search is needed to find the job O(n), which will usually timeout or cause other issues. Having score will turn it into 0(1). As for how to get the score, you can use the failed/2 to paginate (basically the way UI works).
from exq.
@ananthakumaran thank you for the quick answer.
I see that find_failed/4
works perfectly in exq_ui
example when we already have the list of failed jobs preload. But in our case we only have jid
that was returned by enqueue
. We use find_failed/2
and find_retry/2
for troubleshooting.
I feel like finding job by only jid is still might be useful. Could we undeprecate these functions?
Just found out that find_failed/2
does the same work as failed/2
does under the hood. Now I know how to implement workaround for us
from exq.
It only works if you have a small number of jobs in the retry queue. I understand this is very much desired, but the way data is stored (list, zset), we don't have an easy way to lookup based on jid. Doing any kind of scan on a system with a lot of jobs will bring other series issues (timeout, memory issues etc). These functions were used by the older version of exq_ui which didn't have proper pagination etc. Now we have solved those issues and marked the problematic apis as deprecated.
from exq.
Related Issues (20)
- Proposal: add middleware hook just before apply(mod, fun, args) in Task started by worker HOT 2
- Can't find running job HOT 1
- How to configure a worker at runtime? HOT 4
- Order of middleware execution HOT 1
- Busy Tab is not working HOT 2
- Busy Tab is not working
- no function clause matching in Exq.Manager.Server.handle_call/3 HOT 2
- `Exq.enqueue_in` doesn't work in `mode: [:enqueuer, :api]` HOT 3
- Exq vs Oban? HOT 1
- Redis 6.0 ACL is supported ? HOT 1
- Dynamic subscription enqueued workers never run HOT 2
- Logging middleware doesn't give support for enqueueing logs HOT 5
- expected :timeout to be an integer of :infinity, got: nil HOT 5
- Unique jobs feature is not working HOT 2
- expected :timeout to be an integer of :infinity HOT 2
- Feature Request: enqueue a batch of jobs atomically HOT 3
- Missing assign `:worker_module` HOT 2
- How many queues can I create? HOT 10
- How to configure Exq to push jobs to Sidekiq? HOT 2
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 exq.