Class: GoodJob::Scheduler::TimerSet

Inherits:
Concurrent::TimerSet
  • Object
show all
Defined in:
lib/good_job/scheduler.rb

Overview

Custom sub-class of Concurrent::TimerSet for additional behavior.

Instance Method Summary collapse

Instance Method Details

#lengthInteger

Number of scheduled jobs in the queue

Returns:

  • (Integer)


286
287
288
# File 'lib/good_job/scheduler.rb', line 286

def length
  @queue.length
end

#resetvoid

This method returns an undefined value.

Clear the queue



292
293
294
# File 'lib/good_job/scheduler.rb', line 292

def reset
  synchronize { @queue.clear }
end