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 bug where disconnect-after-idle stopped working #1004

Merged
merged 1 commit into from
May 8, 2019

Conversation

lox
Copy link
Contributor

@lox lox commented May 8, 2019

We introduced a bug in #985 where the wrong return param from the register API was checked and the idle monitor never detected all the agents idle.

Closes #1003.

@lox
Copy link
Contributor Author

lox commented May 8, 2019

This needs a test, but it's tough to test, so going to get a fix out first.

@@ -485,7 +485,7 @@ func (a *AgentWorker) Ping() {
if a.agentConfiguration.DisconnectAfterIdleTimeout > 0 {
a.logger.Info("Job finished. Resetting idle timer...")
a.idleTimer.Reset(time.Second * time.Duration(a.agentConfiguration.DisconnectAfterIdleTimeout))
a.idleMonitor.MarkBusy(a.agent.Name)
a.idleMonitor.MarkBusy(a.agent.UUID)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

🤦🏼‍♂️

Choose a reason for hiding this comment

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

😂 nice one

@lox lox merged commit 703c58b into master May 8, 2019
@lox lox deleted the fix-disconnct-after-idle-when-used-with-spawn branch May 8, 2019 04:46
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.

Agent not terminating with disconnect-after-idle-out anymore
2 participants