File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -21,15 +21,18 @@ trait WaitForWakeTrait
2121 public function waitForWake (Environment $ env , LoggerInterface $ logger )
2222 {
2323 $ waits = 0 ;
24+ $ max_waits = $ this ->getConfig ()->get ('max_waits ' , 25 );
25+ $ logger ->debug ('max_waits: {max_waits} ' , ['max_waits ' => $ max_waits ]);
2426 do {
27+ $ logger ->debug ('wait #{waits} ' , ['waits ' => $ waits +1 ]);
2528 $ woke = $ env ->wake ();
2629 if (($ woke ['success ' ] ?? false ) === true ) {
2730 break ;
2831 }
2932 // if success is empty, then the site is still waking up.
3033 // Allow user to set the number of retries if the site is still waking up.
3134 // Default should be 25 times, once per second.
32- if ($ waits > $ this -> getConfig ()-> get ( " wait_for_wake_repeat " , 25 ) ) {
35+ if ($ waits > $ max_waits ) {
3336 $ this ->log ()->error ('{target} could not be reached, domain returned {status_code}. ' , [
3437 'status_code ' => $ woke ['response ' ]['status_code ' ],
3538 ]);
You can’t perform that action at this time.
0 commit comments