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

Commit0172c5b

Browse files
fix: pass currentTick to GetWorkspacesEligibleForTransition
1 parenta982168 commit0172c5b

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

‎coderd/autobuild/lifecycle_executor.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ func (e *Executor) runOnce(t time.Time) Stats {
142142
// NOTE: If a workspace build is created with a given TTL and then the user either
143143
// changes or unsets the TTL, the deadline for the workspace build will not
144144
// have changed. This behavior is as expected per #2229.
145-
workspaces,err:=e.db.GetWorkspacesEligibleForTransition(e.ctx,t)
145+
workspaces,err:=e.db.GetWorkspacesEligibleForTransition(e.ctx,currentTick)
146146
iferr!=nil {
147147
e.log.Error(e.ctx,"get workspaces for autostart or autostop",slog.Error(err))
148148
returnstats

‎coderd/database/dbmem/dbmem.go‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6955,8 +6955,7 @@ func (q *FakeQuerier) GetWorkspacesEligibleForTransition(ctx context.Context, no
69556955
build.Transition==database.WorkspaceTransitionStop&&
69566956
workspace.AutostartSchedule.Valid&&
69576957
(workspace.NextStartAt.Time.IsZero()||
6958-
now.After(workspace.NextStartAt.Time)||
6959-
now.Equal(workspace.NextStartAt.Time)) {
6958+
!now.Before(workspace.NextStartAt.Time)) {
69606959
workspaces=append(workspaces, database.GetWorkspacesEligibleForTransitionRow{
69616960
ID:workspace.ID,
69626961
Name:workspace.Name,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp