File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed
Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,9 @@ module Scheduler
1616 pidfile : 'PIDFILE' ,
1717 poll_sleep_amount : 'RESQUE_SCHEDULER_INTERVAL' ,
1818 verbose : 'VERBOSE' ,
19- lock_timeout : 'LOCK_TIMEOUT'
19+ lock_timeout : 'LOCK_TIMEOUT' ,
20+ delayed_requeue_batch_size : 'DELAYED_REQUEUE_BATCH_SIZE' ,
21+ disable_delayed_requeue_batches : 'DISABLE_DELAYED_REQUEUE_BATCHES'
2022 } . freeze
2123
2224 class Cli
@@ -74,6 +76,18 @@ class Cli
7476 {
7577 args : [ '-v' , '--verbose' , 'Run with verbose output [VERBOSE]' ] ,
7678 callback : -> ( options ) { -> ( v ) { options [ :verbose ] = v } }
79+ } ,
80+ {
81+ args : [ '--lock-timeout [LOCK_TIMEOUT]' , 'Lock timeout' ] ,
82+ callback : -> ( options ) { -> ( t ) { options [ :lock_timeout ] = t } }
83+ } ,
84+ {
85+ args : [ '--delayed-requeue-batch-size [DELAYED_REQUEUE_BATCH_SIZE]' , 'Delayed requeue batch size' ] ,
86+ callback : -> ( options ) { -> ( d ) { options [ :delayed_requeue_batch_size ] = d } }
87+ } ,
88+ {
89+ args : [ '--disable-delayed-requeue-batches [DISABLE_DELAYED_REQUEUE_BATCHES]' , 'Disable delayed requeue batches' ] ,
90+ callback : -> ( options ) { -> ( d ) { options [ :disable_delayed_requeue_batches ] = d } }
7791 }
7892 ] . freeze
7993
Original file line number Diff line number Diff line change @@ -67,13 +67,17 @@ def setup_scheduler_configuration
6767
6868 c . logformat = options [ :logformat ] if options . key? ( :logformat )
6969
70- c . lock_timeout = options [ :lock_timeout ] if options . key? ( :lock_timeout )
70+ c . lock_timeout = options [ :lock_timeout ] . to_i if options . key? ( :lock_timeout )
7171
7272 if ( psleep = options [ :poll_sleep_amount ] ) && !psleep . nil?
7373 c . poll_sleep_amount = Float ( psleep )
7474 end
7575
7676 c . verbose = !!options [ :verbose ] if options . key? ( :verbose )
77+
78+ c . delayed_requeue_batch_size = options [ :delayed_requeue_batch_size ] . to_i if options . key? ( :delayed_requeue_batch_size )
79+
80+ c . disable_delayed_requeue_batches = !!options [ :disable_delayed_requeue_batches ] if options . key? ( :disable_delayed_requeue_batches )
7781 end
7882 end
7983 # rubocop:enable Metrics/AbcSize
You can’t perform that action at this time.
0 commit comments