Skip to content

Instantly share code, notes, and snippets.

@jlsherrill
Created July 22, 2014 00:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jlsherrill/7d885b53cb80c42a98ba to your computer and use it in GitHub Desktop.
Save jlsherrill/7d885b53cb80c42a98ba to your computer and use it in GitHub Desktop.
def plan(repo)
action_subject(repo)
sequence do
other_actions = []
sync_task = plan_action(Pulp::Repository::Sync, pulp_id: repo.pulp_id)
concurrence do
other_actions << plan_action(Katello::Repository::NodeMetadataGenerate, repo, sync_task.output[:pulp_tasks])
other_actions << plan_action(ElasticSearch::Repository::IndexContent, pulp_task: sync_task.output[:pulp_tasks], id: repo.id)
end
other_actions << plan_action(ElasticSearch::Reindex, repo)
other_actions << plan_action(Katello::Foreman::ContentUpdate, repo.environment, repo.content_view)
other_actions.each{|action| action.add_dependency(sync_task)}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment