Comments (10)
I updated to 2.3.2 and I still have the same problem... Any idea what might be wrong? It's kind of a show-stopper for me unfortunately.
Thanks!
from sidekiq-unique-jobs.
Real sorry you are having that problem still! Uniqueness should have been added automagically. Any chance you could share the project with us or if that isn't possible could you try and replicate the problem in a fresh repo?
from sidekiq-unique-jobs.
Thanks for caring. I put together a small project that reproduces the problem.
Just run bundle and rake spec.
https://dl.dropbox.com/u/132165/unique-job-bug.zip
I also ran into another issue I haven't seen before, but I wonder if it's a Sidekiq but rather than a unique-jobs bug. I marked that test as "pending".
from sidekiq-unique-jobs.
It's obviously getting late, I started running tests instead of specs. I'll be back
from sidekiq-unique-jobs.
Are you sure that middleware is executed in the tests? I'm not sure it is.
from sidekiq-unique-jobs.
FYI I just realized that in my spec file, I try to queue a whole activerecord object. The problem still persists when I replace the object with a simple string such as 'abc'.
NotificationPushWorker.perform_in(5.minutes, 'abc')
from sidekiq-unique-jobs.
Yup mike is right, to test this you would need to test against a real redis since the sidekiq/test doesn't take into consideration any middleware, it just pushes everything to jobs array without hesitation.
before {
Sidekiq.redis = REDIS
Sidekiq.redis {|c| c.flushdb }
}
it "does not store duplicate jobs" do
3.times {
Sidekiq::Client.push('class' => NotificationPushWorker, 'queue' => 'notification_push', 'args' => notification.id)
}
Sidekiq.redis { |c| c.llen('queue:notification_push') }.should eql 1
end
Really not ideal agreeably, I'll see if I can add some sort of hook for testing this in a client app.
from sidekiq-unique-jobs.
Ah! So basically, you're saying that my tests fail but that in real life, it should just work?
I guess I'll test with the workaround for now. Thanks!
from sidekiq-unique-jobs.
I can confirm via playing around on my own apps that the middleware does work and get executed. My jobs are unique, but I agree that not seeing it show up in the client middleware stack was confusing. I'm just glad this is working.
from sidekiq-unique-jobs.
Awesome :)
from sidekiq-unique-jobs.
Related Issues (20)
- `unlocked` reflection is never called
- Logging::Middleware.context can include empty string as key when lock is not set in job hash HOT 1
- PRIMED key grows indefinitely when job re-queues itself in `after_unlock` callback HOT 1
- until_and_while_executing and lock_ttl: jobs silently dropped HOT 3
- incompatibility with sidekiq-failures HOT 4
- Deprecation Warning: Use of rpoplpush command in Redis HOT 1
- Redis has deprecated the `rpoplpush`command
- Release new gem version with "fix replace deprecated rpoplpush w/lmove" HOT 3
- `while_executing` with `on_conflict: :reschedule` Reschedule job after job execution HOT 7
- Reaper manager registration is subject to race conditions HOT 1
- Should client middleware also be added to the Sidekiq server config? HOT 2
- After sidekiq shutdown (with running job) lock digest is not pushned back HOT 8
- Returning same job id HOT 7
- Sidekiq 7: Unsupported command argument type: TrueClass HOT 1
- register_reaper_process nx: true crash Sidekiq on startup HOT 2
- uniquejobs:digests sorted set seems to grow forever HOT 3
- should respond to `has_valid_sidekiq_options?` HOT 4
- Compatibility with Sidekiq7 HOT 4
- until_and_while_executing not entering perform method on initial run HOT 7
- No 'Changelog' link is being displayed on https://rubygems.org/gems/sidekiq-unique-jobs HOT 1
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-unique-jobs.