Skip to content

Commit 1975a45

Browse files
committed
Equal times should be valid for autostart
1 parent 0d09d4c commit 1975a45

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

coderd/autobuild/lifecycle_executor.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,8 @@ func isEligibleForAutostart(ws database.Workspace, build database.WorkspaceBuild
364364
return false
365365
}
366366

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

370371
// isEligibleForAutostart returns true if the workspace should be autostopped.

0 commit comments

Comments
 (0)