Created
July 22, 2014 00:54
-
-
Save jlsherrill/7d885b53cb80c42a98ba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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