Skip to content

fix: Prevent autobuild executor from slowing down API requests #3726

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

Merged
merged 4 commits into from
Sep 2, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: Ensure deleted workspaces are not eligible
  • Loading branch information
mafredri committed Sep 2, 2022
commit b4a650b370214df16236d66087d4b5ed7ea2e8da
2 changes: 1 addition & 1 deletion coderd/autobuild/executor/lifecycle_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func (e *Executor) runOnce(t time.Time) Stats {
}

func isEligibleForAutoStartStop(ws database.Workspace) bool {
return ws.AutostartSchedule.String != "" || ws.Ttl.Int64 > 0
return !ws.Deleted && (ws.AutostartSchedule.String != "" || ws.Ttl.Int64 > 0)
}

func getNextTransition(
Expand Down