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)


330
331
332
# File 'lib/good_job/scheduler.rb', line 330

def length
  @queue.length
end

#resetvoid

This method returns an undefined value.

Clear the queue



336
337
338
# File 'lib/good_job/scheduler.rb', line 336

def reset
  synchronize { @queue.clear }
end