We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent3a03b9d commit82a486fCopy full SHA for 82a486f
coderd/autostart/lifecycle/lifecycle_executor.go
@@ -38,15 +38,9 @@ func NewExecutor(ctx context.Context, db database.Store, log slog.Logger, tick <
38
// tick from its channel. It will stop when its context is Done, or when
39
// its channel is closed.
40
func (e*Executor)Run() {
41
-for {
42
-select {
43
-caset:=<-e.tick:
44
-iferr:=e.runOnce(t);err!=nil {
45
-e.log.Error(e.ctx,"error running once",slog.Error(err))
46
-}
47
-case<-e.ctx.Done():
48
-return
49
-default:
+fort:=rangee.tick {
+iferr:=e.runOnce(t);err!=nil {
+e.log.Error(e.ctx,"error running once",slog.Error(err))
50
}
51
52
@@ -94,6 +88,7 @@ func (e *Executor) runOnce(t time.Time) error {
94
88
slog.F("workspace_id",ws.ID),
95
89
slog.F("latest_build_transition",latestBuild.Transition),
96
90
)
91
+continue
97
92
98
93
99
// Round time to the nearest minute, as this is the finest granularity cron supports.