|
...
|
...
|
@@ -32,18 +32,16 @@ class CopyImageFileListener implements ShouldQueue |
|
|
|
if(!empty($imageList)){
|
|
|
|
$amazonS3Service = new AmazonS3Service();
|
|
|
|
foreach ($imageList as $k => $v){
|
|
|
|
$rs = $amazonS3Service->syncImageFiles(getImageUrl($v['path']),$v['size']);
|
|
|
|
$amazonS3Service->syncImageFiles(getImageUrl($v['path']));
|
|
|
|
$imageModel->edit(['is_cos'=>0],['id'=>$v['id']]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
sleep(2);
|
|
|
|
$fileModel = new FileModel();
|
|
|
|
$fileList = $fileModel->list(['project_id'=>$this->param['project_id'],'is_cos'=>1],'id',['id','path','is_cos']);
|
|
|
|
if(!empty($fileList)){
|
|
|
|
$amazonS3Service = new AmazonS3Service();
|
|
|
|
foreach ($fileList as $k => $v){
|
|
|
|
$amazonS3Service->syncImageFiles(getImageUrl($v['path']),$v['size']);
|
|
|
|
$amazonS3Service->syncImageFiles(getImageUrl($v['path']));
|
|
|
|
$fileList->edit(['is_cos'=>0],['id'=>$v['id']]);
|
|
|
|
}
|
|
|
|
}
|
...
|
...
|
|