Giter Club home page Giter Club logo

Comments (10)

antonzhyliuk avatar antonzhyliuk commented on May 23, 2024 1

Sorry, I tried to reproduce this bug again and everything works now, so I dont remember precisely what it was.
This is my current working configuration"
I setup schedule in sidekiq.rb initializer at bottom of file:

Sidekiq.schedule = YAML.load_file("config/schedule.yml")

config/schedule.yml

authenticom_daily_files_import:
  cron: "0 4 * * *"
  class: AuthenticomDailyFilesImportWorker
  queue: default
check_alerts:
  cron: "0 2 * * *"
  class: CheckAlertsWorker
  queue: default

I'll close this issue and start feature request to adding button for manually enqueueing jobs through web ui

from sidekiq-scheduler.

elpic avatar elpic commented on May 23, 2024

Could you add more information please.

For example Gemfile.lock

And how do you load the sidekiq (using be sidekiq or from rails)

Thanks

from sidekiq-scheduler.

imageaid avatar imageaid commented on May 23, 2024

I'm actually having this issue as well. I can watch my console and see the job(s) run at the correct time but it would definitely be helpful to have the web ui populated to get an overview (because we have lots of jobs!).

On our production and staging servers, Sidekiq is started by Capistrano (v2.x) commands. Locally, on which I am currently working, I start Sidekiq by firing it up in a terminal. Also, locally, I'm just testing with a single worker/job to be scheduled.

newsletter_worker:
  cron: "5,20,35,50 * * * *"
  class: NewsletterWorker
  queue: default
  description: "This job grabs and assembles newsletters scheduled to go out 6 hours from when it runs."

What information could I supply (Gemfile.lock attached) to help better?

Thank you!

Gemfile.lock.txt

from sidekiq-scheduler.

elpic avatar elpic commented on May 23, 2024

@imageaid Could you send me the sidekiq config and how do you start sidekiq?

Thanks

from sidekiq-scheduler.

imageaid avatar imageaid commented on May 23, 2024

Sidekiq config details follow (let me know if you need anything else!):
Sidekiq initializer

Sidekiq.configure_server do |config|
  config.error_handlers << Proc.new { |ex,ctx_hash| Airbrake.notify(ex, ctx_hash) }
  config.redis = { url: 'redis://localhost:6379/1' }
end

Sidekiq.configure_client do |config|
  config.redis = { url: 'redis://localhost:6379/1' }
end

Sidekiq YML

:verbose: true
:concurrency: 5
:pidfile: tmp/pids/sidekiq.pid
:timeout: 300
:queues:
  - [critical, 2]
  - default
staging:
  :concurrency: 5
production:
  :concurrency: 15

Start
bundle exec sidekiq

scheduler.rb

require 'sidekiq/scheduler'
Sidekiq.schedule = YAML.load_file(File.expand_path('../../../config/scheduler.yml',__FILE__))

Thank you!

Running Sidekiq 4.0.1 and redis 3.0.4

from sidekiq-scheduler.

elpic avatar elpic commented on May 23, 2024

Could you try to change the scheduler.rb to the following

require 'sidekiq/scheduler'

Sidekiq.configure_server do |config|
  config.on(:startup) do
    Sidekiq.schedule = YAML.load_file(File.expand_path('../../../config/scheduler.yml',__FILE__))
    Sidekiq::Scheduler.load_schedule! # This will retrigger the loading stage 
  end
end

Anyway I think is better to include a schedule key on the sidekiq.yml with the content of the scheduler.yml. With this approach you don't need to reload the schedule.

Please let me know if this help you.

from sidekiq-scheduler.

imageaid avatar imageaid commented on May 23, 2024

YOU. ROCK!

Reloading the schedule was the trick. Popped up in the UI right away.

Thanks, so much, not only for the help but also the gem :)! Happy New Year!

from sidekiq-scheduler.

elpic avatar elpic commented on May 23, 2024

Thank you for using the gem. I glad that you like it :D

from sidekiq-scheduler.

elpic avatar elpic commented on May 23, 2024

Happy New Year :D

from sidekiq-scheduler.

dmill avatar dmill commented on May 23, 2024

Sidekiq::Scheduler.load_schedule! still works when this issue occurs. Just upgraded to a multi-host setup which I assumed caused this to start happening to me. Thank you!

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.