正在显示
1 个修改的文件
包含
2 行增加
和
4 行删除
| @@ -32,18 +32,16 @@ class CopyImageFileListener implements ShouldQueue | @@ -32,18 +32,16 @@ class CopyImageFileListener implements ShouldQueue | ||
| 32 | if(!empty($imageList)){ | 32 | if(!empty($imageList)){ |
| 33 | $amazonS3Service = new AmazonS3Service(); | 33 | $amazonS3Service = new AmazonS3Service(); |
| 34 | foreach ($imageList as $k => $v){ | 34 | foreach ($imageList as $k => $v){ |
| 35 | - $rs = $amazonS3Service->syncImageFiles(getImageUrl($v['path']),$v['size']); | 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 | } | 37 | } |
| 38 | } | 38 | } |
| 39 | - | ||
| 40 | - sleep(2); | ||
| 41 | $fileModel = new FileModel(); | 39 | $fileModel = new FileModel(); |
| 42 | $fileList = $fileModel->list(['project_id'=>$this->param['project_id'],'is_cos'=>1],'id',['id','path','is_cos']); | 40 | $fileList = $fileModel->list(['project_id'=>$this->param['project_id'],'is_cos'=>1],'id',['id','path','is_cos']); |
| 43 | if(!empty($fileList)){ | 41 | if(!empty($fileList)){ |
| 44 | $amazonS3Service = new AmazonS3Service(); | 42 | $amazonS3Service = new AmazonS3Service(); |
| 45 | foreach ($fileList as $k => $v){ | 43 | foreach ($fileList as $k => $v){ |
| 46 | - $amazonS3Service->syncImageFiles(getImageUrl($v['path']),$v['size']); | 44 | + $amazonS3Service->syncImageFiles(getImageUrl($v['path'])); |
| 47 | $fileList->edit(['is_cos'=>0],['id'=>$v['id']]); | 45 | $fileList->edit(['is_cos'=>0],['id'=>$v['id']]); |
| 48 | } | 46 | } |
| 49 | } | 47 | } |
-
请 注册 或 登录 后发表评论