You can now use
perform_in to schedule jobs
to run at arbitrary points in the future, like so:
SomeWorker.perform_in(5.days, 'bob', 13) SomeWorker.perform_at(5.days.from_now, 'bob', 13)
It also works with the delay extensions:
The time is approximately when the job will be placed on the queue; it is not guaranteed to run at precisely at that moment in time.
This functionality is meant for one-off, arbitrary jobs. I still
clockwork if you want cron-like,
recurring jobs. See
I want to specially thank @yabawock for his work on sidekiq-scheduler. His extension for Sidekiq 1.x filled an obvious functional gap that I now think is useful enough to implement in Sidekiq proper.
- Fixed issues due to Redis 3.x API changes. Sidekiq now requires the Redis 3.x client.
- Sidekiq::Worker now has access to Sidekiq's standard logger
- Fix issue with non-StandardErrors leading to Processor exhaustion
- Fix issue with Fetcher slowing Sidekiq shutdown
- Print backtraces for all threads upon TTIN signal [#183]
- Overhaul retries Web UI with new index page and bulk operations [#184]
- Full or partial error backtraces can optionally be stored as part of the retry for display in the web UI if you aren't using an error service. [#155]
class Worker include Sidekiq::Worker sidekiq_options :backtrace => [true || 10] end
- Add timeout option to kill a worker after N seconds (blackgold9)
class HangingWorker include Sidekiq::Worker sidekiq_options :timeout => 600 def perform # will be killed if it takes longer than 10 minutes end end
- Fix delayed extensions not available in workers [#152]
- In test environments add the
#drainclass method to workers. This method executes all previously queued jobs. (panthomakos)
- Sidekiq workers can be run inline during tests, just
- Queues can now be deleted from the Sidekiq web UI [#154]
- Fix unnecessary shutdown delay due to Retry Poller [#174]
- Add 24 hr expiry for basic keys set in Redis, to avoid any possible leaking.
- Only register workers in Redis while working, to avoid lingering workers [#156]
- Speed up shutdown significantly.
- Better network error handling when fetching jobs from Redis. Sidekiq will retry once per second until it can re-establish a connection. (ryanlecompte)
- capistrano recipe now uses
bundle_cmdif set [#147]
- handle multi_json API changes (sferik)
- Fix double restart with cap deploy [#137]
- Set procline for easy monitoring of Sidekiq status via "ps aux"
- Fix race condition on shutdown [#134]
- Fix hang with cap sidekiq:start [#131]
- The Sidekiq license has switched from GPLv3 to LGPLv3!
- Sidekiq::Client.push now returns whether the actual Redis operation succeeded or not. [#123]
- Remove UniqueJobs from the default middleware chain. Its functionality, while useful, is unexpected for new Sidekiq users. You can re-enable it with the following config. Read #119 for more discussion.
Sidekiq.configure_client do |config| require 'sidekiq/middleware/client/unique_jobs' config.client_middleware do |chain| chain.add Sidekiq::Middleware::Client::UniqueJobs end end Sidekiq.configure_server do |config| require 'sidekiq/middleware/server/unique_jobs' config.server_middleware do |chain| chain.add Sidekiq::Middleware::Server::UniqueJobs end end
Thanks to all Sidekiq users and contributors for helping me get to this big milestone!
- Default concurrency on client-side to 5, not 25 so we don't create as many unused Redis connections, same as ActiveRecord's default pool size.
- Ensure redis= is given a Hash or ConnectionPool.
- Implement "safe shutdown". The messages for any workers that are still busy when we hit the TERM timeout will be requeued in Redis so the messages are not lost when the Sidekiq process exits. [#110]
- Work around Celluloid's small 4kb stack limit [#115]
- Add support for a custom Capistrano role to limit Sidekiq to a set of machines. [#113]
- Fix fetch breaking retry when used with Redis namespaces. [#109]
- Redis connection now just a plain ConnectionPool, not CP::Wrapper.
- Capistrano initial deploy fix [#106]
- Re-implemented weighted queues support (ryanlecompte)
- Client-side API changes, added sidekiq_options for Sidekiq::Worker. As a side effect of this change, the client API works on Ruby 1.8. It's not officially supported but should work [#103]
- NO POLL! Sidekiq no longer polls Redis, leading to lower network utilization and lower latency for message processing.
- Add --version CLI option
- Add details page for jobs in retry queue (jcoene)
- Display relative timestamps in web interface (jcoene)
- Capistrano fixes (hinrik, bensie)
- Reworked capistrano recipe to make it more fault-tolerant [#94].
- Automatic failure retry! Sidekiq will now save failed messages and retry them, with an exponential backoff, over about 20 days. Did a message fail to process? Just deploy a bug fix in the next few days and Sidekiq will retry the message eventually.
- Fix missed deprecations, poor method name in web UI
- Add -t option to configure the TERM shutdown timeout
- TERM shutdown timeout is now configurable, defaults to 5 seconds.
- USR1 signal now stops Sidekiq from accepting new work, capistrano sends USR1 at start of deploy and TERM at end of deploy giving workers the maximum amount of time to finish.
- New Sidekiq::Web rack application available
- Updated Sidekiq.redis API
- Remove :namespace and :server CLI options (mperham)
- Add ExceptionNotifier support (masterkain)
- Add capistrano support (mperham)
- Workers now log upon start and finish (mperham)
- Messages for terminated workers are now automatically requeued (mperham)
- Add support for Exceptional error reporting (bensie)
- Example chef recipe and monitrc script (jc00ke)
- Refactor global configuration into Sidekiq.configure_server and Sidekiq.configure_client blocks. (mperham)
- Add optional middleware FailureJobs which saves failed jobs to a 'failed' queue (fbjork)
- Upon shutdown, workers are now terminated after 5 seconds. This is to meet Heroku's hard limit of 10 seconds for a process to shutdown. (mperham)
- Refactor middleware API for simplicity, see sidekiq/middleware/chain. (mperham)
delayextensions for ActionMailer and ActiveRecord. (mperham)
- Added config file support. See test/config.yml for an example file. (jc00ke)
- Added pidfile for tools like monit (jc00ke)
- Resque-compatible processing stats in redis (mperham)
- Simple client testing support in sidekiq/testing (mperham)
- Plain old Ruby support via the -r cli flag (mperham)
- Refactored middleware support, introducing ability to add client-side middleware (ryanlecompte)
- Added middleware for ignoring duplicate jobs (ryanlecompte)
- Added middleware for displaying jobs in resque-web dashboard (maxjustus)
- Added redis namespacing support (maxjustus)
- Initial release!