File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed
apps/webapp/app/v3/services/worker Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -52,24 +52,20 @@ export class WorkerGroupTokenService extends WithRunEngine {
5252 async findWorkerGroup ( { token } : { token : string } ) {
5353 const tokenHash = await this . hashToken ( token ) ;
5454
55- const workerGroupToken = await this . _prisma . workerGroupToken . findFirst ( {
55+ const workerGroup = await this . _prisma . workerInstanceGroup . findFirst ( {
5656 where : {
57- workerGroup : {
58- isNot : null ,
57+ token : {
58+ tokenHash ,
5959 } ,
60- tokenHash,
61- } ,
62- include : {
63- workerGroup : true ,
6460 } ,
6561 } ) ;
6662
67- if ( ! workerGroupToken ) {
68- logger . warn ( "[WorkerGroupTokenService] Token not found" , { token } ) ;
69- return ;
63+ if ( ! workerGroup ) {
64+ logger . warn ( "[WorkerGroupTokenService] No matching worker group found" , { token } ) ;
65+ return null ;
7066 }
7167
72- return workerGroupToken . workerGroup ;
68+ return workerGroup ;
7369 }
7470
7571 async rotateToken ( { workerGroupId } : { workerGroupId : string } ) {
You can’t perform that action at this time.
0 commit comments