Comments (5)
I've been doing more local testing and seeing what happens if we just have perform_async
rather than perform_in
so that the run order is more roughly the same as the enqueue order, and I have not been able to reproduce a situation where the callback is called before any instance of each of the nested jobs has run. So I suspect that the trick is to not combine unique_for
and batches and perform_in
and things will be more safe.
from sidekiq.
All of this is As Designed. Uniqueness and batches often don't play well together.
from sidekiq.
Mike - this is kind of the conclusion that I came to as well. How easy would it be within the current architecture to make it so that if you add a job to a batch which is declared as unique that it would raise an exception or log a warning? I'm happy to do my best to avoid doing this, but if someone changed the behaviour of a job without realising that other people were using it in a batch then this might cause hard-to-spot errors - it would be nice if we got a nice clear warning that this was happening?
from sidekiq.
Uniqueness is a sharp knife, that’s why the batch wiki page warns the reader about it, but logging a warning would be useful the first time but annoying every other time.
from sidekiq.
I am toying with recording an expiring key in REDIS each time a job completes that is unique by it's input params. Then when a new job starts up it can check to see whether the same job has completed which started after the current job was enqueued and if so then just returning as a noop. That way we can intermix batches and this-form-of-uniqueness without a problem.
from sidekiq.
Related Issues (20)
- Configuration to disable "start" & "done" logs HOT 3
- Not thread local
- 7.3.0+: Issue when running sidekiq-scheduler specs against 2.7 HOT 3
- Retry Now in the retries tab does not increase the retry count HOT 6
- Sidekiq 7.x on Ruby 2.7 crashes on `hash.except("at")` HOT 2
- Batch tests fail without running Redis instance available HOT 3
- Job picked up from the queue multiple times over a longer time HOT 12
- Running sidekiqswarm on docker container HOT 8
- Push bulk of multiple batches with jobs HOT 3
- Job interruptions are confusing Sidekiq Web HOT 3
- Feature Request: Additional Colorblind-friendly Web UI Colors HOT 2
- Sidekiq.transactional_push! doesn't work with multiple databases HOT 1
- Lots of `b-#{bid}-notify` keys with no expiration in my Redis instance HOT 5
- Massive number of Redis lmove operations after upgrading to Sidekiq 7.2 HOT 12
- uninitialized constant Sidekiq::Component after upgrading from 7.2.4 to 7.3.0 HOT 2
- undefined method broadcast for class ActiveSupport::Logger using sidekiq 7.3.0 with rails 7.1.3.4 in Docker HOT 5
- The testing "jobs" obj is empty when adding jobs to at batch using push_bulk and requiring 'sidekiq/testing' in a helper file HOT 2
- Overwriting RAILS_ENV? HOT 6
- Middleware to add stacktrace at the point of being enqued does not work in production HOT 5
- Sidekiq Queue Limit Set in Redis leading to incomplete utilization of available threads HOT 5
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 sidekiq.