Class: Actions::SccManager::SyncPlanAccountRepositories
- Inherits:
-
EntryAction
- Object
- EntryAction
- Actions::SccManager::SyncPlanAccountRepositories
- Includes:
- RecurringAction
- Defined in:
- app/lib/actions/scc_manager/sync_plan_account_repositories.rb
Instance Method Summary collapse
- #add_missing_task_group(sync_plan) ⇒ Object
- #humanized_name ⇒ Object
- #plan(scc_account) ⇒ Object
- #rescue_strategy ⇒ Object
Instance Method Details
#add_missing_task_group(sync_plan) ⇒ Object
15 16 17 18 19 20 21 |
# File 'app/lib/actions/scc_manager/sync_plan_account_repositories.rb', line 15 def add_missing_task_group(sync_plan) if sync_plan.task_group.nil? sync_plan.task_group = ::SccAccountSyncPlanTaskGroup.create! sync_plan.save! end task.add_missing_task_groups(sync_plan.task_group) end |
#humanized_name ⇒ Object
29 30 31 32 33 34 35 |
# File 'app/lib/actions/scc_manager/sync_plan_account_repositories.rb', line 29 def humanized_name if input.try(:[], :sync_plan_name) _('Update SUSE repositories %s') % (input[:sync_plan_name] || _('Unknown')) else _('Update SUSE repositories') end end |
#plan(scc_account) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'app/lib/actions/scc_manager/sync_plan_account_repositories.rb', line 5 def plan(scc_account) add_missing_task_group(scc_account) action_subject(scc_account) User.as_anonymous_admin do plan_action(::Actions::SccManager::SyncRepositories, scc_account) plan_self(:sync_plan_name => scc_account.name) end end |
#rescue_strategy ⇒ Object
23 24 25 26 27 |
# File 'app/lib/actions/scc_manager/sync_plan_account_repositories.rb', line 23 def rescue_strategy # Dynflow::Action::Rescue::Skip # REMOVEME Dynflow::Action::Rescue::Fail end |