Skip to content

feat: add controls to template for determining startup days #10226

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 14 commits into from
Oct 13, 2023
Prev Previous commit
Next Next commit
Equal times should be valid for autostart
  • Loading branch information
Emyrk committed Oct 11, 2023
commit 1975a4518090456caadbf0fb83448bcaa22fd320
3 changes: 2 additions & 1 deletion coderd/autobuild/lifecycle_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,8 @@ func isEligibleForAutostart(ws database.Workspace, build database.WorkspaceBuild
return false
}

return currentTick.After(nextTransition)
// Must used '.Before' vs '.After' so equal times are considered "valid for autostart".
return !currentTick.Before(nextTransition)
}

// isEligibleForAutostart returns true if the workspace should be autostopped.
Expand Down