Sha256: 11946d5c8bae70e6864bd7a153dba081c16c76993bc2db6684c02ca276641719

Contents?: true

Size: 515 Bytes

Versions: 20

Compression:

Stored size: 515 Bytes

Contents

# vim:fileencoding=utf-8

require 'resque/tasks'
require 'resque-scheduler'

namespace :resque do
  task :setup

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

  desc 'Start Resque 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:setup'].invoke unless scheduler_cli.pre_setup
  end
end

Version data entries

20 entries across 20 versions & 4 rubygems

Version Path
resque-scheduler-4.11.0 lib/resque/scheduler/tasks.rb
resque-scheduler-4.10.2 lib/resque/scheduler/tasks.rb
resque-scheduler-4.10.1 lib/resque/scheduler/tasks.rb
resque-scheduler-4.10.0 lib/resque/scheduler/tasks.rb
resque-scheduler-4.9.0 lib/resque/scheduler/tasks.rb
resque-scheduler-4.8.0 lib/resque/scheduler/tasks.rb
resque-scheduler-4.7.0 lib/resque/scheduler/tasks.rb
resque-scheduler-4.6.0 lib/resque/scheduler/tasks.rb
resque-scheduler-4.5.0 lib/resque/scheduler/tasks.rb
istox-resque-scheduler-1.0.0.pre lib/resque/scheduler/tasks.rb
resque-scheduler-4.4.0 lib/resque/scheduler/tasks.rb
resque-scheduler-4.3.1 lib/resque/scheduler/tasks.rb
resque_admin-scheduler-1.0.2 lib/resque/scheduler/tasks.rb
resque-admin-scheduler-1.0.2 lib/resque/scheduler/tasks.rb
resque-scheduler-4.3.0 lib/resque/scheduler/tasks.rb
resque-scheduler-4.2.1 lib/resque/scheduler/tasks.rb
resque-scheduler-4.2.0 lib/resque/scheduler/tasks.rb
resque-scheduler-4.1.0 lib/resque/scheduler/tasks.rb
resque-scheduler-4.0.0 lib/resque/scheduler/tasks.rb
resque-scheduler-3.1.0 lib/resque/scheduler/tasks.rb