File tree 2 files changed +6
-8
lines changed
wrongsecrets-balancer/src
2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -1299,11 +1299,10 @@ const deleteDesktopPodForTeam = async (team) => {
1299
1299
module . exports . deleteDesktopPodForTeam = deleteDesktopPodForTeam ;
1300
1300
1301
1301
const getJuiceShopInstanceForTeamname = ( teamname ) => {
1302
- logger . info ( ' checking readiness' ) ;
1303
- k8sAppsApi
1302
+ logger . info ( ` checking readiness for ${ teamname } ` ) ;
1303
+ return k8sAppsApi
1304
1304
. readNamespacedDeployment ( `t-${ teamname } -wrongsecrets` , `t-${ teamname } ` )
1305
1305
. then ( ( res ) => {
1306
- logger . info ( JSON . stringify ( res ) ) ;
1307
1306
if (
1308
1307
Object . prototype . hasOwnProperty . call ( res . body , 'metadata' ) &&
1309
1308
Object . prototype . hasOwnProperty . call ( res . body . metadata , 'annotations' )
Original file line number Diff line number Diff line change @@ -514,7 +514,6 @@ async function resetPasscode(req, res) {
514
514
error
515
515
) } `
516
516
) ;
517
- // logger.error(error.message);
518
517
return res . status ( 500 ) . send ( { message : 'Unknown error while resetting passcode.' } ) ;
519
518
}
520
519
}
@@ -537,16 +536,16 @@ async function awaitReadiness(req, res) {
537
536
return res . status ( 200 ) . send ( ) ;
538
537
}
539
538
540
- await sleep ( 1000 ) ;
539
+ await sleep ( 4000 ) ;
541
540
542
- logger . error ( `Waiting for deployment of team '${ team } ' timed out` ) ;
543
- res . status ( 500 ) . send ( { message : 'Waiting for Deployment Readiness Timed Out' } ) ;
544
541
} catch ( error ) {
545
542
logger . error ( `Failed to wait for teams '${ team } ' deployment to get ready: ${ error } ` ) ;
546
543
logger . error ( error ) ;
547
- res . status ( 500 ) . send ( { message : 'Failed to Wait For Deployment Readiness' } ) ;
544
+ return res . status ( 500 ) . send ( { message : 'Failed to Wait For Deployment Readiness' } ) ;
548
545
}
549
546
}
547
+ logger . error ( `Waiting for deployment of team '${ team } ' timed out` ) ;
548
+ return res . status ( 500 ) . send ( { message : 'Waiting for Deployment Readiness Timed Out' } ) ;
550
549
}
551
550
552
551
/**
You can’t perform that action at this time.
0 commit comments