Class: PuppetX::Relay::Agent::Backend::Dummy

Inherits:
Base
  • Object
show all
Defined in:
lib/puppet_x/relay/agent/backend/dummy.rb

Instance Attribute Summary

Attributes inherited from Base

#relay_api

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from PuppetX::Relay::Agent::Backend::Base

Instance Method Details

#exec(run, schedule) ⇒ Object



8
9
10
11
12
13
14
15
16
17
# File 'lib/puppet_x/relay/agent/backend/dummy.rb', line 8

def exec(run, schedule)
  new_state =
    if schedule.elapsed > 5
      run.state.to_complete(outcome: 'finished')
    else
      run.state.to_in_progress(schedule.next_update_before)
    end

  run.with_state(new_state)
end