Code Monkey home page Code Monkey logo

Comments (5)

jankeesvw avatar jankeesvw commented on June 16, 2024 1

I haven't found the time to fully dig into it. I created the issue mostly so people can find this when they run into this. I imagine that it's our combination of gems. I did a bundle update upgraded to Sidekiq 6.5.9.

I'm going to have to figure this out soon, if I find something I'll post it here.

from sidekiq-scheduler.

marcelolx avatar marcelolx commented on June 16, 2024

Can you create a sample app @jankeesvw in which we can reproduce this? It will not be enough just knowing the line it is erroring out...

Stack trace, your schedule definition, Gemfile, etc... would also help

from sidekiq-scheduler.

mauricebolhuis avatar mauricebolhuis commented on June 16, 2024

I encountered the same error (using sidekiq 7.2.2 and sidekiq-scheduler 5.0.3). Starting of today I got the following error while attempting to start Sidekiq:

11:36:07 sidekiq.1 | 2024-05-01T09:36:07.190Z pid=515927 tid=axvj INFO: Scheduling foo {"class"=>"FooJob", "at"=>"2024/04/30", "enabled"=>false, "queue"=>"default"}
11:36:07 sidekiq.1 | 2024-05-01T09:36:07.191Z pid=515927 tid=axvj WARN: {"context":"Exception during Sidekiq lifecycle event.","event":"startup"}
11:36:07 sidekiq.1 | 2024-05-01T09:36:07.191Z pid=515927 tid=axvj WARN: NoMethodError: undefined method `next_time' for nil
11:36:07 sidekiq.1 | 2024-05-01T09:36:07.191Z pid=515927 tid=axvj WARN: 
11:36:07 sidekiq.1 | undefined method `next_time' for nil
11:36:07 sidekiq.1 | /home/maurice/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/sidekiq-scheduler-5.0.3/lib/sidekiq-scheduler/scheduler.rb:133:in `block in load_schedule_job'
11:36:07 sidekiq.1 | /home/maurice/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/sidekiq-scheduler-5.0.3/lib/sidekiq-scheduler/scheduler.rb:123:in `each'
11:36:07 sidekiq.1 | /home/maurice/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/sidekiq-scheduler-5.0.3/lib/sidekiq-scheduler/scheduler.rb:123:in `load_schedule_job'
11:36:07 sidekiq.1 | /home/maurice/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/sidekiq-scheduler-5.0.3/lib/sidekiq-scheduler/scheduler.rb:101:in `block in load_schedule!'
11:36:07 sidekiq.1 | /home/maurice/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/sidekiq-scheduler-5.0.3/lib/sidekiq-scheduler/scheduler.rb:99:in `each'
11:36:07 sidekiq.1 | /home/maurice/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/sidekiq-scheduler-5.0.3/lib/sidekiq-scheduler/scheduler.rb:99:in `load_schedule!'
11:36:07 sidekiq.1 | /home/maurice/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/sidekiq-scheduler-5.0.3/lib/sidekiq-scheduler/manager.rb:24:in `start'
11:36:07 sidekiq.1 | /home/maurice/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/sidekiq-scheduler-5.0.3/lib/sidekiq-scheduler/sidekiq_adapter.rb:41:in `start_schedule_manager'
11:36:07 sidekiq.1 | /home/maurice/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/sidekiq-scheduler-5.0.3/lib/sidekiq-scheduler.rb:21:in `block (2 levels) in <main>'

I have a job that has been scheduled using an at schedule type:

:scheduler:
  :schedule:
    foo:
      class: FooJob
      at: '2024/04/30'
      enabled: false

It seems like the error occurs when a job has been scheduled using an at rule with a date in the past. I have created a pull request to resolve this issue: #466

from sidekiq-scheduler.

marcelolx avatar marcelolx commented on June 16, 2024

Thank you so much @mauricebolhuis! I will look into this issue next week along with other PRs I have on my list! I really appreciate the PR 🙏

from sidekiq-scheduler.

marcelolx avatar marcelolx commented on June 16, 2024

Fixed by #466 466

from sidekiq-scheduler.

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.