Class: Jets::Job::Task
- Inherits:
-
Lambda::Task
- Object
- Lambda::Task
- Jets::Job::Task
- Defined in:
- lib/jets/job/task.rb
Instance Attribute Summary collapse
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Attributes inherited from Lambda::Task
#class_name, #iam_policy, #lang, #managed_iam_policy, #meth, #properties, #type
Instance Method Summary collapse
-
#initialize(class_name, meth, options = {}) ⇒ Task
constructor
A new instance of Task.
- #schedule_expression ⇒ Object
Methods inherited from Lambda::Task
#build_function_iam?, #full_handler, #get_type, #handler_base, #handler_path, #lang_ext, #name, #poly_src_path
Constructor Details
#initialize(class_name, meth, options = {}) ⇒ Task
Returns a new instance of Task.
3 4 5 6 7 8 |
# File 'lib/jets/job/task.rb', line 3 def initialize(class_name, meth, ={}) super @rate = [:rate] @cron = [:cron] @state = [:state] || 'ENABLED' end |
Instance Attribute Details
#state ⇒ Object (readonly)
Returns the value of attribute state.
2 3 4 |
# File 'lib/jets/job/task.rb', line 2 def state @state end |
Instance Method Details
#schedule_expression ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/jets/job/task.rb', line 10 def schedule_expression if @rate "rate(#{@rate})" elsif @cron "cron(#{@cron})" end end |