Skip to content

Shutdown agent after idle timeout#140

Merged
lucaspin merged 8 commits intomasterfrom
idle-timeout
Dec 14, 2021
Merged

Shutdown agent after idle timeout#140
lucaspin merged 8 commits intomasterfrom
idle-timeout

Conversation

@lucaspin
Copy link
Copy Markdown
Contributor

@lucaspin lucaspin commented Dec 13, 2021

  • Add --disconnect-after-idle-timeout argument to shutdown agent after a period of idleness
  • Expose SEMAPHORE_AGENT_SHUTDOWN_REASON environment variable to shutdown hook script. The main reason for this addition is to implement scaling down on agent-aws-stack. When an agent shuts down due to a finished job, we want the autoscaling group to spin up a new agent, so we terminate that instance, but keep the same desired count on the autoscaling group. When an agent shuts down due to idleness, we don't really want the autoscaling group to spin up a new instance, so we terminate the instance and decrement the desired count for the autoscaling group.
  • Doc changes are here: Add docs on disconnect-after-idle-timeout docs#1104

@lucaspin lucaspin requested a review from shiroyasha December 13, 2021 22:02
Comment thread pkg/listener/job_processor.go Outdated
@lucaspin lucaspin merged commit 1f67db9 into master Dec 14, 2021
@lucaspin lucaspin deleted the idle-timeout branch December 14, 2021 16:53
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.

2 participants