Class: Raktr::Tasks::Delayed

Inherits:
Periodic show all
Defined in:
lib/raktr/tasks/delayed.rb

Overview

Note:

Time accuracy cannot be guaranteed.

Task occurring after Periodic#interval seconds.

Author:

Instance Attribute Summary

Attributes inherited from Periodic

#interval

Attributes inherited from Base

#owner

Instance Method Summary collapse

Methods inherited from Periodic

#initialize

Methods inherited from Base

#done, #hash, #initialize, #to_proc

Constructor Details

This class inherits a constructor from Raktr::Tasks::Periodic

Instance Method Details

#call(*args) ⇒ Object?

Note:

Will call Base#done right after.

Return value of the configured task or ‘nil` if it’s not time yet.

Returns:

  • (Object, nil)

    Return value of the configured task or ‘nil` if it’s not time yet.



24
25
26
27
28
# File 'lib/raktr/tasks/delayed.rb', line 24

def call( *args )
    return if !call?

    call_task( *args ).tap { done }
end