Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add manual dependency assignment #124

Open
jlsherrill opened this issue Jul 22, 2014 · 0 comments
Open

Add manual dependency assignment #124

jlsherrill opened this issue Jul 22, 2014 · 0 comments

Comments

@jlsherrill
Copy link
Contributor

It would be very nice to be able to manually assign dependencies when defining sub-actions of an action. Right now we can only rely on output of a previous action to set the dependency chain. This would allow us to do something where if the first actions failed (and we allow it to be skipped), the rest would abort as well.

Something like (as an example):

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.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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant