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

Polling sub tasks #243

Merged
merged 17 commits into from Jul 31, 2017
Merged

Polling sub tasks #243

merged 17 commits into from Jul 31, 2017

Conversation

adamruzicka
Copy link
Contributor

@adamruzicka adamruzicka commented Jul 24, 2017

  • resuming
  • tests
    • tests for polling
    • tests for polling + bulk
    • tests for resume


def wait_for_sub_plans(sub_plans)
increase_counts(sub_plans.count, 0)
if is_a?(::Dynflow::Action::WithBulkSubPlans)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this check?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't really need it, but it makes sense to start polling after all the sub plans were spawned.


def recalculate_counts
total = sub_plans.count
@sub_plans = nil # TODO:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Planning to clean this TODOs, right? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is being fixed in #240 , should I pull the changes here as well?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If they are dependent, having two commits in one PR, with the final set of changes would be the best.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both PRs should now contain commit fdf57ed with the common changes

describe ::Dynflow::Action::WithPollingSubPlans do
include TestHelpers

let(:klok) { Dynflow::Testing::ManagedClock.new }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason not to call it :clock?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not really, will change it

@iNecas
Copy link
Member

iNecas commented Jul 26, 2017

Codewise looks good, waiting for the test of the tests to start testing this manually

@iNecas iNecas merged commit 11d44de into Dynflow:master Jul 31, 2017
@iNecas
Copy link
Member

iNecas commented Jul 31, 2017

Tested and works well. Thanks @adamruzicka. Please crate an issue for foreman_remote_execution to start using it and let's add it there. I think it's a prerequisity for http://projects.theforeman.org/issues/19937/ to work as expected (from the user point of view)

@adamruzicka adamruzicka deleted the polling-sub-tasks branch August 1, 2017 05:52
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

Successfully merging this pull request may close these issues.

None yet

2 participants