File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
wrongsecrets-balancer/src Expand file tree Collapse file tree 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) => {
12991299module . exports . deleteDesktopPodForTeam = deleteDesktopPodForTeam ;
13001300
13011301const getJuiceShopInstanceForTeamname = ( teamname ) => {
1302- logger . info ( ' checking readiness' ) ;
1303- k8sAppsApi
1302+ logger . info ( ` checking readiness for ${ teamname } ` ) ;
1303+ return k8sAppsApi
13041304 . readNamespacedDeployment ( `t-${ teamname } -wrongsecrets` , `t-${ teamname } ` )
13051305 . then ( ( res ) => {
1306- logger . info ( JSON . stringify ( res ) ) ;
13071306 if (
13081307 Object . prototype . hasOwnProperty . call ( res . body , 'metadata' ) &&
13091308 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) {
514514 error
515515 ) } `
516516 ) ;
517- // logger.error(error.message);
518517 return res . status ( 500 ) . send ( { message : 'Unknown error while resetting passcode.' } ) ;
519518 }
520519}
@@ -537,16 +536,16 @@ async function awaitReadiness(req, res) {
537536 return res . status ( 200 ) . send ( ) ;
538537 }
539538
540- await sleep ( 1000 ) ;
539+ await sleep ( 4000 ) ;
541540
542- logger . error ( `Waiting for deployment of team '${ team } ' timed out` ) ;
543- res . status ( 500 ) . send ( { message : 'Waiting for Deployment Readiness Timed Out' } ) ;
544541 } catch ( error ) {
545542 logger . error ( `Failed to wait for teams '${ team } ' deployment to get ready: ${ error } ` ) ;
546543 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' } ) ;
548545 }
549546 }
547+ logger . error ( `Waiting for deployment of team '${ team } ' timed out` ) ;
548+ return res . status ( 500 ) . send ( { message : 'Waiting for Deployment Readiness Timed Out' } ) ;
550549}
551550
552551/**
You can’t perform that action at this time.
0 commit comments