@@ -207,6 +207,7 @@ export class WorkerGroupTokenService extends WithRunEngine {
207207 prisma : this . _prisma ,
208208 engine : this . _engine ,
209209 type : WorkerInstanceGroupType . MANAGED ,
210+ name : workerGroup . name ,
210211 workerGroupId : workerGroup . id ,
211212 workerInstanceId : workerInstance . id ,
212213 masterQueue : workerGroup . masterQueue ,
@@ -242,6 +243,7 @@ export class WorkerGroupTokenService extends WithRunEngine {
242243 prisma : this . _prisma ,
243244 engine : this . _engine ,
244245 type : WorkerInstanceGroupType . UNMANAGED ,
246+ name : workerGroup . name ,
245247 workerGroupId : workerGroup . id ,
246248 workerInstanceId : workerInstance . id ,
247249 masterQueue : workerGroup . masterQueue ,
@@ -481,6 +483,7 @@ export type WorkerInstanceEnv = z.infer<typeof WorkerInstanceEnv>;
481483
482484export type AuthenticatedWorkerInstanceOptions = WithRunEngineOptions < {
483485 type : WorkerInstanceGroupType ;
486+ name : string ;
484487 workerGroupId : string ;
485488 workerInstanceId : string ;
486489 masterQueue : string ;
@@ -492,20 +495,22 @@ export type AuthenticatedWorkerInstanceOptions = WithRunEngineOptions<{
492495
493496export class AuthenticatedWorkerInstance extends WithRunEngine {
494497 readonly type : WorkerInstanceGroupType ;
498+ readonly name : string ;
495499 readonly workerGroupId : string ;
496500 readonly workerInstanceId : string ;
497501 readonly masterQueue : string ;
498502 readonly environment : RuntimeEnvironment | null ;
499503 readonly deploymentId ?: string ;
500504 readonly backgroundWorkerId ?: string ;
501505
502- // FIXME
506+ // FIXME: Required for unmanaged workers
503507 readonly isLatestDeployment = true ;
504508
505509 constructor ( opts : AuthenticatedWorkerInstanceOptions ) {
506510 super ( { prisma : opts . prisma , engine : opts . engine } ) ;
507511
508512 this . type = opts . type ;
513+ this . name = opts . name ;
509514 this . workerGroupId = opts . workerGroupId ;
510515 this . workerInstanceId = opts . workerInstanceId ;
511516 this . masterQueue = opts . masterQueue ;
@@ -715,6 +720,7 @@ export class AuthenticatedWorkerInstance extends WithRunEngine {
715720 if ( this . type === WorkerInstanceGroupType . MANAGED ) {
716721 return {
717722 type : WorkerInstanceGroupType . MANAGED ,
723+ name : this . name ,
718724 workerGroupId : this . workerGroupId ,
719725 workerInstanceId : this . workerInstanceId ,
720726 masterQueue : this . masterQueue ,
@@ -723,6 +729,7 @@ export class AuthenticatedWorkerInstance extends WithRunEngine {
723729
724730 return {
725731 type : WorkerInstanceGroupType . UNMANAGED ,
732+ name : this . name ,
726733 workerGroupId : this . workerGroupId ,
727734 workerInstanceId : this . workerInstanceId ,
728735 masterQueue : this . masterQueue ,
@@ -761,12 +768,14 @@ export class AuthenticatedWorkerInstance extends WithRunEngine {
761768export type WorkerGroupTokenAuthenticationResponse =
762769 | {
763770 type : typeof WorkerInstanceGroupType . MANAGED ;
771+ name : string ;
764772 workerGroupId : string ;
765773 workerInstanceId : string ;
766774 masterQueue : string ;
767775 }
768776 | {
769777 type : typeof WorkerInstanceGroupType . UNMANAGED ;
778+ name : string ;
770779 workerGroupId : string ;
771780 workerInstanceId : string ;
772781 masterQueue : string ;
0 commit comments