Skip to content

Commit cc0e161

Browse files
committed
wire up executor to coderd
1 parent 4bf344b commit cc0e161

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cli/server.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ import (
4343
"github.com/coder/coder/coderd/database/databasefake"
4444
"github.com/coder/coder/coderd/devtunnel"
4545
"github.com/coder/coder/coderd/gitsshkey"
46+
"github.com/coder/coder/coderd/lifecycle/executor"
4647
"github.com/coder/coder/coderd/turnconn"
4748
"github.com/coder/coder/codersdk"
4849
"github.com/coder/coder/cryptorand"
@@ -343,6 +344,11 @@ func server() *cobra.Command {
343344
return xerrors.Errorf("notify systemd: %w", err)
344345
}
345346

347+
lifecyclePoller := time.NewTicker(30 * time.Second)
348+
defer lifecyclePoller.Stop()
349+
lifecycleExecutor := executor.New(cmd.Context(), options.Database, logger, lifecyclePoller.C)
350+
go lifecycleExecutor.Run()
351+
346352
// Because the graceful shutdown includes cleaning up workspaces in dev mode, we're
347353
// going to make it harder to accidentally skip the graceful shutdown by hitting ctrl+c
348354
// two or more times. So the stopChan is unlimited in size and we don't call

0 commit comments

Comments
 (0)