Module: Resque::Scheduler::Server

Defined in:
lib/resque/scheduler/server.rb

Defined Under Namespace

Modules: HelperMethods, ServerMethods

Constant Summary collapse

TIMESTAMP_FORMAT =
'%Y-%m-%d %H:%M:%S %z'.freeze
VIEW_PATH =
File.join(File.dirname(__FILE__), 'server', 'views')

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object


17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/resque/scheduler/server.rb', line 17

def self.included(base)
  base.class_eval do
    helpers { include HelperMethods }
    include ServerMethods

    get('/schedule') { schedule }
    post('/schedule/requeue') { schedule_requeue }
    post('/schedule/requeue_with_params') do
      schedule_requeue_with_params
    end
    delete('/schedule') { delete_schedule }
    get('/delayed') { delayed }
    get('/delayed/jobs/:klass') { delayed_jobs_klass }
    post('/delayed/search') { delayed_search }
    get('/delayed/:timestamp') { delayed_timestamp }
    post('/delayed/queue_now') { delayed_queue_now }
    post('/delayed/cancel_now') { delayed_cancel_now }
    post('/delayed/clear') { delayed_clear }
  end
end