xielin před 6 roky
rodič
revize
e279af5cb8
1 změnil soubory, kde provedl 5 přidání a 4 odebrání
  1. 5 4
      app/Console/Commands/apollo.php

+ 5 - 4
app/Console/Commands/apollo.php

@@ -44,7 +44,7 @@ class Apollo extends Command
             config('apollo.namespaces')
         );
         $this->apollo->save_dir = $this->save_dir;
-        if(!is_dir($this->save_dir)){
+        if (!is_dir($this->save_dir)) {
             mkdir($this->save_dir);
         }
     }
@@ -72,14 +72,15 @@ class Apollo extends Command
                     Log::error('Load Apollo Config Failed, no config available');
                 }
                 $tpl = file_get_contents($this->config_tpl);
-                foreach ($apollo as $key =>$value){
-                    $tpl = str_replace('{'.$key.'}',$value,$tpl);
+                foreach ($apollo as $key => $value) {
+                    $tpl = str_replace('{' . $key . '}', $value, $tpl);
                 }
-                file_put_contents($this->config_file,$tpl);
+                file_put_contents($this->config_file, $tpl);
             }); //此处传入回调
             if ($error) {
                 Log::info("Apollo Hand error :" . $error);
             }
+            sleep(60);
         } while ($error && $restart);
     }
 }