Get sidekiq to execute a job immediately

There are two questions here. If you want to execute a job immediately, in the current context you can use: SyncUser.new.perform(user.id) If you want to decrease the delay between asynchronous work being scheduled and when it’s executed in the sidekiq worker, you can decrease the poll_interval setting: Sidekiq.configure_server do |config| config.poll_interval = 2 end The … Read more

Are there console commands to look at whats in the queue and to clear the queue in Sidekiq?

There is an ergonomic API for viewing and managing queues. It is not required by default. require ‘sidekiq/api’ Here’s the excerpt: # get a handle to the default queue default_queue = Sidekiq::Queue.new # get a handle to the mailer queue mailer_queue = Sidekiq::Queue.new(“mailer”) # How many jobs are in the default queue? default_queue.size # => … Read more

Resque vs Sidekiq? [closed]

Resque: Pros: does not require thread safety (works with pretty much any gem out there); has no interpreter preference (you can use any ruby); Resque currently supports MRI 2.3.0 or later loads of plugins. Cons runs a process per worker (uses more memory); does not retry jobs (out of the box, anyway). Sidekiq: Pros runs … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)