Comments (3)
You could pass in a proc that does nothing: https://github.com/veeqo/activejob-uniqueness/blob/main/lib/generators/active_job/uniqueness/templates/config/initializers/active_job_uniqueness.rb#L18
from activejob-uniqueness.
@bmulholland - sorry to not reply earlier. I missed your reply. We actually already tried that. Do you see something I am missing in our syntax?
unique :until_and_while_executing,
lock_ttl: 1.hour,
on_conflict: ->(job) { logger.warn "Already in queue - not queueing again: #{job.arguments}" },
on_runtime_conflict: ->(job) { logger.warn "Already executing - not queueing again: #{job.arguments}" }
Note that we tried it empty and had no output, and just on a whim moved it to this where we would at least see something if it started running the procs.
Here is an example of the lines we still get in our logs:
[ActiveJob] [CacheWarmingJob] [7aafce65-1b3a-4183-bb44-ba447fb77cd1] Error performing CacheWarmingJob (Job ID: 7aafce65-1b3a-4183-bb44-ba447fb77cd1) from Sidekiq(low_priority) in 78.73ms: a before_perform callback halted the job execution
from activejob-uniqueness.
I should also call out that I know this is ActiveJob itself doing this - in fact I know the line of code is https://github.com/rails/rails/blob/13b3e7d83988d451ea305243319cc715a06617ea/activejob/lib/active_job/log_subscriber.rb#L93. But I was hoping there was an established wait to silence this would either a hacked logger or monkeypatching that subsciber.
from activejob-uniqueness.
Related Issues (20)
- Kill old job if runs too long? HOT 1
- Clarification on Sidekiq patch HOT 1
- Issue unlocking Jobs manually HOT 2
- Support for Rails 7.0.0 HOT 3
- Support for re-enque later, or drop-previous HOT 2
- Turn off test_mode! for some tests only? HOT 3
- ActiveJob perform_now results in crash when the patch tries to delete the resource HOT 1
- Error when seeding HOT 1
- Support Sidekiq 7 HOT 6
- Support Redis 6+ via Redlock 2 HOT 2
- SSL error with sidekiq and heroku redis premium HOT 1
- Unlock on dead jobs in the UI
- Clear a queue
- Incompatible with Rails 7.1.0 HOT 2
- Random redis errors on delete_lock HOT 1
- Sporadic RedisClient::ConnectionError: Broken pipe HOT 6
- ActiveJob::Uniqueness::StrategyNotFound: Strategy 'until_executed' is not found. Is it declared in the configuration?
- Upgrading `0.2.5` to `0.3.1` hit some "Redlock::LockAcquisitionError" issues HOT 6
- `RedisClient::CommandError` on retry
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 activejob-uniqueness.