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

fix reloading after emergency mode #398

Merged
merged 2 commits into from Jul 14, 2018

Conversation

jjsaunier
Copy link
Contributor

fixes: #397, #384

@@ -1030,10 +1030,7 @@ public function closeSlaves($graceful = false, $onSlaveClosed = null)
$onSlaveClosed($slave);
}
}

$this->filesLastMTime = [];
Copy link
Contributor

Choose a reason for hiding this comment

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

Why dont these need be reset?

Copy link
Contributor Author

@jjsaunier jjsaunier Jul 14, 2018

Choose a reason for hiding this comment

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

That the bug in fact, from ProcessManager POV, if you reset the set of tracked files, they are lost until you restart the ppm process. This is non sense to reset them when closes slaves because it's not related to slaves.

So when a runtime error pop, this is called, and the file watcher is watching ... an empty array and it will never reload

@@ -944,11 +944,11 @@ protected function closeSlave($slave)
/**
* Reload slaves in-place, allowing busy workers to finish what they are doing.
*/
public function reloadSlaves()
Copy link
Contributor

Choose a reason for hiding this comment

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

Gracefull -> graceful ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

comment addressed

@andig
Copy link
Contributor

andig commented Jul 13, 2018

Great pr- much appreciated!

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.

Slave doesn't restart correctly after fixing a runtime error
3 participants