File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -637,16 +637,15 @@ func createWorkspace(
637
637
provisionerJob * database.ProvisionerJob
638
638
workspaceBuild * database.WorkspaceBuild
639
639
provisionerDaemons []database.GetEligibleProvisionerDaemonsByProvisionerJobIDsRow
640
-
641
- agentTokensByAgentID map [uuid.UUID ]string
642
640
)
643
641
644
642
prebuildClaimer := (* api .PrebuildsClaimer .Load ()).(prebuilds.Claimer )
645
643
646
644
err = api .Database .InTx (func (db database.Store ) error {
647
645
var (
648
- workspaceID uuid.UUID
649
- claimedWorkspace * database.Workspace
646
+ workspaceID uuid.UUID
647
+ claimedWorkspace * database.Workspace
648
+ agentTokensByAgentID map [uuid.UUID ]string
650
649
)
651
650
652
651
// If a template preset was chosen, try claim a prebuild.
@@ -692,6 +691,7 @@ func createWorkspace(
692
691
api .Logger .Error (ctx , "failed to retrieve running agents of claimed prebuilt workspace" ,
693
692
slog .F ("workspace_id" , claimedWorkspace .ID ), slog .Error (err ))
694
693
}
694
+ agentTokensByAgentID = make (map [uuid.UUID ]string , len (agents ))
695
695
for _ , agent := range agents {
696
696
agentTokensByAgentID [agent .ID ] = agent .AuthToken .String ()
697
697
}
You can’t perform that action at this time.
0 commit comments