Module: Mamiya::Agent::Actions
- Included in:
- Mamiya::Agent
- Defined in:
- lib/mamiya/agent/actions.rb
Instance Method Summary collapse
- #distribute(application, package, labels: nil) ⇒ Object
- #order_task(task, coalesce: false, labels: nil, **payload) ⇒ Object
- #ping ⇒ Object
- #prepare(application, package, labels: nil) ⇒ Object
- #switch(application, package, labels: nil, no_release: false, do_release: false) ⇒ Object
Instance Method Details
#distribute(application, package, labels: nil) ⇒ Object
13 14 15 |
# File 'lib/mamiya/agent/actions.rb', line 13 def distribute(application, package, labels: nil) order_task('fetch', app: application, pkg: package, labels: labels) end |
#order_task(task, coalesce: false, labels: nil, **payload) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/mamiya/agent/actions.rb', line 4 def order_task(task, coalesce: false, labels: nil, **payload) payload[:_labels] = labels if labels trigger('task', coalesce: coalesce, task: task, **payload, ) end |
#ping ⇒ Object
25 26 27 |
# File 'lib/mamiya/agent/actions.rb', line 25 def ping order_task('ping') end |
#prepare(application, package, labels: nil) ⇒ Object
17 18 19 |
# File 'lib/mamiya/agent/actions.rb', line 17 def prepare(application, package, labels: nil) order_task('prepare', app: application, pkg: package, labels: labels) end |
#switch(application, package, labels: nil, no_release: false, do_release: false) ⇒ Object
21 22 23 |
# File 'lib/mamiya/agent/actions.rb', line 21 def switch(application, package, labels: nil, no_release: false, do_release: false) order_task('switch', app: application, pkg: package, labels: labels, no_release: no_release, do_release: do_release) end |