Giter Club home page Giter Club logo

Comments (6)

mickael-palma-argus avatar mickael-palma-argus commented on August 17, 2024 2

Hi,

I prefer using refinements 😄

# Temporary fix: https://github.com/chaps-io/gush/issues/61
# Overrides Gush::Job start! method.
# Resets failed_at variable when Sidekiq reloads a job.
module GushJobFix
  refine Gush::Job do
    def start!
      super
      @failed_at = nil
    end
  end
end

class MyJob < Gush::Job
  using GushJobFix

  def perform
    ...
  end
end

from gush.

mickael-palma-argus avatar mickael-palma-argus commented on August 17, 2024 2

You rock 👍
Great specs BTW 😃

from gush.

pokonski avatar pokonski commented on August 17, 2024 1

@mickael-palma-argus @theo-delaune-argus @jdreic this is now released as 2.0.1, thanks again for the report and help with identifying the issue ❤️

/cc @devilankur18 @hqm42 @vadshalamov

from gush.

pokonski avatar pokonski commented on August 17, 2024

Hey @jdreic, thanks for the report. This sounds like a bug!

from gush.

theo-delaune-argus avatar theo-delaune-argus commented on August 17, 2024

Hi,

The problem occurs in the job parameters.
If job first launch failed, it set @failed_at = time of fail.
But when job is replayed, @failed_at is not resetted to nil.

If you take look at https://github.com/chaps-io/gush/blob/master/lib/gush/worker.rb#L73, when children jobs are enqueued, it checks if parent has succeeded.
Since the parent job still had the @failed_at non-nil, the children are not enqueued.

This is my fix :

# Override Gush::Job start!
# To ensure failed_at is reset when job is relaunched by Sidekiq
class BaseJob < Gush::Job
  def start!
    super
    @failed_at = nil
  end
end

from gush.

pokonski avatar pokonski commented on August 17, 2024

Hey guys! Thank you for finding the culprit! Will release a fix ASAP!

from gush.

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.