File tree Expand file tree Collapse file tree 1 file changed +1
-19
lines changed
Expand file tree Collapse file tree 1 file changed +1
-19
lines changed Original file line number Diff line number Diff line change @@ -38,28 +38,10 @@ public function wake($site_env, $options = [
3838 'delay ' => 3 ,
3939 ])
4040 {
41- $ attempt = 1 ;
4241 $ this ->requireSiteIsNotFrozen ($ site_env );
4342 $ env = $ this ->getEnv ($ site_env );
4443
45- while ($ attempt <= $ options ['retry ' ]) {
46- $ wakeStatus = $ env ->wake ();
47- if (empty ($ wakeStatus ['success ' ])) {
48- $ this ->log ()->notice ('{target} is not awake (attempt {attempt}/{max})... ' , [
49- 'target ' => $ site_env ,
50- 'attempt ' => $ attempt ,
51- 'max ' => $ options ['retry ' ],
52- ]);
53- // If there is any attempt remaining, sleep for the delay period.
54- if ($ attempt <= $ options ['retry ' ] - 1 ) {
55- $ this ->log ()->notice ('Sleeping for {delay} seconds... ' , ['delay ' => $ options ['delay ' ]]);
56- sleep ($ options ['delay ' ]);
57- }
58- $ attempt ++;
59- continue ;
60- }
61- break ;
62- }
44+ $ wakeStatus = $ env ->wake ($ options ['retry ' ], $ options ['delay ' ]);
6345
6446 // @TODO: Move the exceptions up the chain to the `wake` function. (One env is ported over).
6547 if (empty ($ wakeStatus ['success ' ])) {
You can’t perform that action at this time.
0 commit comments