Class: Actions::SccManager::Sync
- Inherits:
-
EntryAction
- Object
- EntryAction
- Actions::SccManager::Sync
- Defined in:
- app/lib/actions/scc_manager/sync.rb
Overview
for dynflow documentation see here: dynflow.github.io/documentation/
Instance Method Summary collapse
Instance Method Details
#finalize ⇒ Object
16 17 18 19 20 |
# File 'app/lib/actions/scc_manager/sync.rb', line 16 def finalize # this is only executed if run actions of SyncRepositories and SyncProducts were successful scc_account = SccAccount.find(input[:scc_account][:id]) scc_account.update! synced: Time.current end |
#humanized_name ⇒ Object
26 27 28 |
# File 'app/lib/actions/scc_manager/sync.rb', line 26 def humanized_name _('Sync SUSE subscriptions') end |
#plan(scc_account) ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'app/lib/actions/scc_manager/sync.rb', line 5 def plan(scc_account) ::Foreman::Logging.logger('foreman_scc_manager') .info("Initiating 'sync' for SccAccount '#{scc_account.name}'.") action_subject(scc_account) sequence do plan_action(::Actions::SccManager::SyncRepositories, scc_account) plan_action(::Actions::SccManager::SyncProducts, scc_account) plan_self end end |
#rescue_strategy ⇒ Object
22 23 24 |
# File 'app/lib/actions/scc_manager/sync.rb', line 22 def rescue_strategy Dynflow::Action::Rescue::Fail end |