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

Explanation for plan.init vs inside plan.work method. #8614

Merged
merged 2 commits into from Apr 17, 2018

Conversation

anastasiamac
Copy link
Contributor

Description of change

Timing is everything, especially for initialization.

Credential validator worker has a watcher that needs to be initialized before worker's Work.
This PR adds a comment that explains why it needs to happen before Work is started.

Copy link
Member

@wallyworld wallyworld left a comment

Choose a reason for hiding this comment

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

Great thank you

@@ -81,6 +81,15 @@ func NewWorker(config Config) (worker.Worker, error) {
err = catacomb.Invoke(catacomb.Plan{
Site: &v.catacomb,
Work: v.loop,
// The watcher needs to be added to the worker's catacomb plan
// here in order to be controlled by this worker lifecycle events:
Copy link
Member

Choose a reason for hiding this comment

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

worker's

@anastasiamac
Copy link
Contributor Author

$$merge$$

@jujubot jujubot merged commit 9eb5a3a into juju:develop Apr 17, 2018
@anastasiamac anastasiamac changed the title Explanantion for plan.init vs inside plan.work method. Explanation for plan.init vs inside plan.work method. Apr 17, 2018
@anastasiamac anastasiamac deleted the worker-comment branch April 17, 2018 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants