# vim:fileencoding=utf-8 require 'resque_admin/tasks' require 'resque_admin-scheduler_admin' namespace :resque_admin do task :setup def scheduler_admin_cli @scheduler_admin_cli ||= ResqueAdmin::Scheduler::Cli.new( %W(#{ENV['RESQUE_SCHEDULER_OPTIONS']}) ) end desc 'Start ResqueAdmin Scheduler' task scheduler_admin: :scheduler_admin_setup do scheduler_admin_cli.setup_env scheduler_admin_cli.run_forever end task :scheduler_admin_setup do scheduler_admin_cli.parse_options Rake::Task['resque_admin:setup'].invoke unless scheduler_admin_cli.pre_setup end end