Giter VIP home page Giter VIP logo

Comments (3)

bmulholland avatar bmulholland commented on August 17, 2024

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.

nhorton avatar nhorton commented on August 17, 2024

@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.

nhorton avatar nhorton commented on August 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.