合并分支 'lyh-server' 到 'master'
Lyh server 查看合并请求 !3119
正在显示
5 个修改的文件
包含
8 行增加
和
26 行删除
| @@ -38,12 +38,11 @@ class SyncFile extends Command | @@ -38,12 +38,11 @@ class SyncFile extends Command | ||
| 38 | }else{ | 38 | }else{ |
| 39 | $code = $this->synchronizationFile($v['path']); | 39 | $code = $this->synchronizationFile($v['path']); |
| 40 | } | 40 | } |
| 41 | - echo date('Y-m-d H:i:s') . 'code:'. $code . PHP_EOL; | ||
| 42 | - if((int)$code == 200){ | ||
| 43 | - echo date('Y-m-d H:i:s') . '编辑的path为:'. $v['path'] .',主键id:'. $v['id'] . PHP_EOL; | ||
| 44 | - $errorFileModel->edit(['status'=>1],['id'=>$v['id']]); | ||
| 45 | - } | ||
| 46 | - | 41 | +// echo date('Y-m-d H:i:s') . 'code:'. $code . PHP_EOL; |
| 42 | +// if((int)$code == 200){ | ||
| 43 | +// echo date('Y-m-d H:i:s') . '编辑的path为:'. $v['path'] .',主键id:'. $v['id'] . PHP_EOL; | ||
| 44 | +// $errorFileModel->edit(['status'=>1],['id'=>$v['id']]); | ||
| 45 | +// } | ||
| 47 | } | 46 | } |
| 48 | echo date('Y-m-d H:i:s') . '编辑的end为:' . PHP_EOL; | 47 | echo date('Y-m-d H:i:s') . '编辑的end为:' . PHP_EOL; |
| 49 | return true; | 48 | return true; |
| @@ -40,9 +40,9 @@ class SyncProjectFile extends Command | @@ -40,9 +40,9 @@ class SyncProjectFile extends Command | ||
| 40 | }else{ | 40 | }else{ |
| 41 | $code = $this->synchronizationFile($v['path']); | 41 | $code = $this->synchronizationFile($v['path']); |
| 42 | } | 42 | } |
| 43 | - if((int)$code == 200){ | 43 | +// if((int)$code == 200){ |
| 44 | echo date('Y-m-d H:i:s') . '编辑的path为:'. $v['path'] .',主键id:'. $v['id'] . PHP_EOL; | 44 | echo date('Y-m-d H:i:s') . '编辑的path为:'. $v['path'] .',主键id:'. $v['id'] . PHP_EOL; |
| 45 | - } | 45 | +// } |
| 46 | } | 46 | } |
| 47 | echo date('Y-m-d H:i:s') . '编辑的end为:' . PHP_EOL; | 47 | echo date('Y-m-d H:i:s') . '编辑的end为:' . PHP_EOL; |
| 48 | return true; | 48 | return true; |
| @@ -35,16 +35,11 @@ class SyncTimeFiles extends Command | @@ -35,16 +35,11 @@ class SyncTimeFiles extends Command | ||
| 35 | $imagesModel = new Image(); | 35 | $imagesModel = new Image(); |
| 36 | $start = '2025-10-1 00:00:00'; | 36 | $start = '2025-10-1 00:00:00'; |
| 37 | $end = '2025-10-31 23:59:59'; | 37 | $end = '2025-10-31 23:59:59'; |
| 38 | - $lists = $imagesModel->list(['created_at'=>['between',[$start,$end]]]); | 38 | + $lists = $imagesModel->list(['created_at'=>['between',[$start,$end]]],'id',['path'],'asc'); |
| 39 | foreach ($lists as $v){ | 39 | foreach ($lists as $v){ |
| 40 | $path = $v['path']; | 40 | $path = $v['path']; |
| 41 | echo date('Y-m-d H:i:s') . ' | 图片链接:' . $path . PHP_EOL; | 41 | echo date('Y-m-d H:i:s') . ' | 图片链接:' . $path . PHP_EOL; |
| 42 | $code = $this->synchronizationFile($path); | 42 | $code = $this->synchronizationFile($path); |
| 43 | - if(200 != (int)$code){ | ||
| 44 | - echo date('Y-m-d H:i:s') . ' | 错误状态:' . $code . PHP_EOL; | ||
| 45 | - $errorFileModel = new ErrorFile(); | ||
| 46 | - $errorFileModel->add(['path'=>$this->param['path'].'/'.$this->param['name']]); | ||
| 47 | - } | ||
| 48 | echo date('Y-m-d H:i:s') . ' | ok:' . $code . PHP_EOL; | 43 | echo date('Y-m-d H:i:s') . ' | ok:' . $code . PHP_EOL; |
| 49 | } | 44 | } |
| 50 | return true; | 45 | return true; |
| @@ -52,8 +47,6 @@ class SyncTimeFiles extends Command | @@ -52,8 +47,6 @@ class SyncTimeFiles extends Command | ||
| 52 | 47 | ||
| 53 | public function synchronizationFile($path_name){ | 48 | public function synchronizationFile($path_name){ |
| 54 | //同步到大文件 | 49 | //同步到大文件 |
| 55 | -// $file_path = config('filesystems.disks.cos')['cdn1'].$path_name; | ||
| 56 | -// $directoryPath = pathinfo($path_name, PATHINFO_DIRNAME); | ||
| 57 | $cmd = 'curl -k -F "file_path='.$path_name.'" -F "save_path=/www/wwwroot/cos'.$path_name.'" https://v6-file.globalso.com/upload.php'; | 50 | $cmd = 'curl -k -F "file_path='.$path_name.'" -F "save_path=/www/wwwroot/cos'.$path_name.'" https://v6-file.globalso.com/upload.php'; |
| 58 | return shell_exec($cmd); | 51 | return shell_exec($cmd); |
| 59 | } | 52 | } |
| @@ -52,11 +52,6 @@ class SyncTimeMinuteFile extends Command | @@ -52,11 +52,6 @@ class SyncTimeMinuteFile extends Command | ||
| 52 | // continue; | 52 | // continue; |
| 53 | // } | 53 | // } |
| 54 | $code = $this->synchronizationFile($path); | 54 | $code = $this->synchronizationFile($path); |
| 55 | - if(200 != (int)$code){ | ||
| 56 | - echo date('Y-m-d H:i:s') . ' | 错误状态:' . $code . PHP_EOL; | ||
| 57 | - $errorFileModel = new ErrorFile(); | ||
| 58 | - $errorFileModel->add(['path'=>$this->param['path'].'/'.$this->param['name']]); | ||
| 59 | - } | ||
| 60 | echo date('Y-m-d H:i:s') . ' | ok:' . $code . PHP_EOL; | 55 | echo date('Y-m-d H:i:s') . ' | ok:' . $code . PHP_EOL; |
| 61 | } | 56 | } |
| 62 | return true; | 57 | return true; |
| @@ -32,11 +32,6 @@ class SyncVideo extends Command | @@ -32,11 +32,6 @@ class SyncVideo extends Command | ||
| 32 | $path = $this->argument('path'); | 32 | $path = $this->argument('path'); |
| 33 | $code = $this->synchronizationFile($path); | 33 | $code = $this->synchronizationFile($path); |
| 34 | echo date('Y-m-d H:i:s') . ' | ' . $code . PHP_EOL; | 34 | echo date('Y-m-d H:i:s') . ' | ' . $code . PHP_EOL; |
| 35 | - if(200 != (int)$code){ | ||
| 36 | - echo date('Y-m-d H:i:s') . ' | ' . $code . PHP_EOL; | ||
| 37 | - $errorFileModel = new ErrorFile(); | ||
| 38 | - $errorFileModel->add(['path'=>$this->param['path'].'/'.$this->param['name']]); | ||
| 39 | - } | ||
| 40 | return true; | 35 | return true; |
| 41 | } | 36 | } |
| 42 | 37 |
-
请 注册 或 登录 后发表评论