Skip to content

Latest commit

 

History

History
72 lines (46 loc) · 1.47 KB

README.md

File metadata and controls

72 lines (46 loc) · 1.47 KB

Redmine Sidekiq

Background jobs will use the Sidekiq on Redmine. You can Monitoring easily used by Sidekiq plugin.

Features

  • Administrator can use the Sidekiq Web UI from the top menu.
  • Add to autoload_paths of the Plugin /app/workers.
  • IMPORTANT: Anyone trying to use the sidekiq :delay method, use :sidekiq_delay instead because for former has clashes with Redmine safe attributes. There is NO change for :delay_for and :delay_until methods.

Installation

$ git clone https://github.com/ogom/redmine_sidekiq ./plugins/redmine_sidekiq
$ bundle install

Usage

Worker

Add worker classes in /plugins/[your plugin]/app/workers.

class HardWorker
  include Sidekiq::Worker
  def perform(name, count)
    # do something
  end
end

Sidekiq Web UI

It appears in the top menu.

top menu

Example

Example of Sidekiq worker.

./plugins/redmine_sidekiq/app/workers/sandbox_worker.rb

Sandbox Web UI

Enqueue from the Web UI.

http://[redmine]/sidekiq/sandbox

Enqueue, click the perform_async(*args) of the Jobs.

sandbox

CLI

Enqueue from the command line.

$ bin/rails runner 'SandboxWorker.perform_async'

License

  • MIT