正在显示
1 个修改的文件
包含
3 行增加
和
2 行删除
| @@ -34,9 +34,10 @@ class CopyImageFileListener implements ShouldQueue | @@ -34,9 +34,10 @@ class CopyImageFileListener implements ShouldQueue | ||
| 34 | foreach ($imageList as $k => $v){ | 34 | foreach ($imageList as $k => $v){ |
| 35 | $amazonS3Service->syncImageFiles(getImageUrl($v['path'])); | 35 | $amazonS3Service->syncImageFiles(getImageUrl($v['path'])); |
| 36 | $imageModel->edit(['is_cos'=>0],['id'=>$v['id']]); | 36 | $imageModel->edit(['is_cos'=>0],['id'=>$v['id']]); |
| 37 | + @file_put_contents(storage_path('logs/lyh_error.log'), var_export('图片:'.$v['id'], true) . PHP_EOL, FILE_APPEND); | ||
| 37 | } | 38 | } |
| 38 | } | 39 | } |
| 39 | - @file_put_contents(storage_path('logs/lyh_error.log'), var_export('图片:'.$v['id'], true) . PHP_EOL, FILE_APPEND); | 40 | + |
| 40 | sleep(2); | 41 | sleep(2); |
| 41 | $fileModel = new FileModel(); | 42 | $fileModel = new FileModel(); |
| 42 | $fileList = $fileModel->list(['project_id'=>$this->param['project_id'],'is_cos'=>1],'id',['id','path','is_cos']); | 43 | $fileList = $fileModel->list(['project_id'=>$this->param['project_id'],'is_cos'=>1],'id',['id','path','is_cos']); |
| @@ -45,9 +46,9 @@ class CopyImageFileListener implements ShouldQueue | @@ -45,9 +46,9 @@ class CopyImageFileListener implements ShouldQueue | ||
| 45 | foreach ($fileList as $k => $v){ | 46 | foreach ($fileList as $k => $v){ |
| 46 | $amazonS3Service->syncImageFiles(getImageUrl($v['path'])); | 47 | $amazonS3Service->syncImageFiles(getImageUrl($v['path'])); |
| 47 | $fileList->edit(['is_cos'=>0],['id'=>$v['id']]); | 48 | $fileList->edit(['is_cos'=>0],['id'=>$v['id']]); |
| 49 | + @file_put_contents(storage_path('logs/lyh_error.log'), var_export('文件:'.$v['id'], true) . PHP_EOL, FILE_APPEND); | ||
| 48 | } | 50 | } |
| 49 | } | 51 | } |
| 50 | - @file_put_contents(storage_path('logs/lyh_error.log'), var_export('文件:'.$v['id'], true) . PHP_EOL, FILE_APPEND); | ||
| 51 | return true; | 52 | return true; |
| 52 | } | 53 | } |
| 53 | } | 54 | } |
-
请 注册 或 登录 后发表评论