Sha256: b1c18a6df77c9230e7be08c266f04b31848d1816ddf8acffd30ed15981c00642

Contents?: true

Size: 543 Bytes

Versions: 2

Compression:

Stored size: 543 Bytes

Contents

# vim:fileencoding=utf-8

require 'resque_admin/tasks'
require 'resque_admin-scheduler'

namespace :resque do
  task :setup

  def scheduler_cli
    @scheduler_cli ||= ResqueAdmin::Scheduler::Cli.new(
      %W(#{ENV['RESQUE_SCHEDULER_OPTIONS']})
    )
  end

  desc 'Start ResqueAdmin Scheduler'
  task scheduler: :scheduler_setup do
    scheduler_cli.setup_env
    scheduler_cli.run_forever
  end

  task :scheduler_setup do
    scheduler_cli.parse_options
    Rake::Task['resque_admin:setup'].invoke unless scheduler_cli.pre_setup
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
resque_admin-scheduler-1.2.0 lib/resque_admin/scheduler/tasks.rb
resque_admin-scheduler-1.1.9 lib/resque_admin/scheduler/tasks.rb