Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions coderd/schedule/autostop.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ const (
// requirement where we skip the requirement and fall back to the next
// scheduled stop. This avoids workspaces being stopped too soon.
//
// E.g. If the workspace is started within an hour of the quiet hours, we
// E.g. If the workspace is started within two hours of the quiet hours, we
// will skip the autostop requirement and use the next scheduled
// stop time instead.
autostopRequirementLeeway = 1 * time.Hour
autostopRequirementLeeway = 2 * time.Hour

// autostopRequirementBuffer is the duration of time we subtract from the
// time when calculating the next scheduled stop time. This avoids issues
Expand Down
4 changes: 2 additions & 2 deletions coderd/schedule/autostop_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,8 @@ func TestCalculateAutoStop(t *testing.T) {
name: "TimeBeforeEpoch",
// The epoch is 2023-01-02 in each timezone. We set the time to
// 1 second before 11pm the previous day, as this is the latest time
// we allow due to our 1h leeway logic.
now: time.Date(2023, 1, 1, 22, 59, 59, 0, sydneyLoc),
// we allow due to our 2h leeway logic.
now: time.Date(2023, 1, 1, 21, 59, 59, 0, sydneyLoc),
templateAllowAutostop: true,
templateDefaultTTL: 0,
userQuietHoursSchedule: sydneyQuietHours,
Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy