Skip to content
Permalink
Browse files

重构调整-day4

  • Loading branch information...
WangNingkai committed Jun 12, 2019
1 parent ec437fd commit 41032ac0da49419143c6af61ca0e16bdb2fd922a
Showing with 6 additions and 1 deletion.
  1. +3 −0 .env.example
  2. +2 −1 app/Jobs/RefreshCache.php
  3. +1 −0 config/olaindex.php
@@ -30,3 +30,6 @@ REDIS_PORT=6379
# default/mdui
THEME=default

# php 路径
PHP_PATH=

@@ -22,7 +22,8 @@ public function __construct()
{
$artisan = base_path('artisan');
$log = storage_path('app' . DIRECTORY_SEPARATOR . 'refresh.log');
$command = "/usr/bin/nohup /usr/bin/php {$artisan} od:cache >> {$log} 2>&1 &";
$phpPath = config('olaindex.php_path');
$command = "/usr/bin/nohup {$phpPath} {$artisan} od:cache >> {$log} 2>&1 &";
$process = new Process($command);
$process->run(static function ($type, $buffer) {
if (Process::ERR === $type) {
@@ -2,4 +2,5 @@
return [
'theme' => env('THEME', 'default').'.',
'php_path' => env('PHP_PATH', '/usr/bin/php'),
];

0 comments on commit 41032ac

Please sign in to comment.
You can’t perform that action at this time.