Comments (4)
How is your CounterCacheJob
configured?
from resque_solo.
@teeparham sorry, I forgot to add that:
class CounterCacheJob
include Resque::Plugins::UniqueJob
@queue = :counter_cache
# adapted from https://github.com/wanelo/counter-cache#default_worker_adapter
def self.perform(base_class, options)
options.symbolize_keys!
options[:source_object_class_name] = base_class.constantize
# options[:counter] is the class name of the counter that called the adapter
counter_class = options[:counter].constantize
counter = counter_class.new(nil, options)
counter.save!
end
end
from resque_solo.
That looks like your job is configured OK. I suspect that the jobs are scheduled, but they are not enqueued until the scheduler runs. At that time, resque_solo
will check the queue and either enqueue the job or not. I don't think there's any issue with this gem. If you want to prevent scheduling duplicate jobs, that's up to whatever you're using to schedule jobs.
from resque_solo.
@teeparham I'm using https://github.com/resque/resque-scheduler - you're probably right, it makes sense because the scheduler can enqueue the jobs ONLY when they need to be executed
I've also found this five year old thread about it resque/resque-scheduler#113
it seems there's no easy solution :)
from resque_solo.
Related Issues (9)
- #enqueued? ... when being worked on? HOT 3
- Compatibility with ResqueMailer HOT 1
- Using resque-scheduler 4.0.0 does not create key resque:solo HOT 1
- Gem not working through `perform_later` due to ActiveJob's ResqueAdapter overriding klass with JobWrapper?
- Jobs aren't being queued HOT 2
- Resque 1.26 support? HOT 1
- Use before hook to check job existence instead of overriding #enqueue_to HOT 1
- Update docs to show how to use lock_after_execution_period option 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 resque_solo.