Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

chore: increase autostop requirement leeway to two hours#15445

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ethanndickson merged 1 commit intomainfromethan/autostop-leeway
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes fromall 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 deletionscoderd/schedule/autostop.go
View file
Open in desktop
Original file line numberDiff line numberDiff 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 withinan hour of the quiet hours, we
// E.g. If the workspace is started withintwo 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 deletionscoderd/schedule/autostop_test.go
View file
Open in desktop
Original file line numberDiff line numberDiff 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 our1h leeway logic.
now: time.Date(2023, 1, 1,22, 59, 59, 0, sydneyLoc),
// we allow due to our2h leeway logic.
now: time.Date(2023, 1, 1,21, 59, 59, 0, sydneyLoc),
templateAllowAutostop: true,
templateDefaultTTL: 0,
userQuietHoursSchedule: sydneyQuietHours,
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp