作者 lyh

gx

... ... @@ -164,8 +164,6 @@ class ProjectLogic extends BaseLogic
}
public function syncImageFile($location,$project_id){
@file_put_contents(storage_path('logs/lyh_error.log'), var_export('进入:'.$location, true) . PHP_EOL, FILE_APPEND);
@file_put_contents(storage_path('logs/lyh_error.log'), var_export('进入:'.$project_id, true) . PHP_EOL, FILE_APPEND);
if($location == 1){
CopyImageFile::dispatch(['project_id'=>$project_id]);
}
... ...
... ... @@ -27,9 +27,11 @@ class CopyImageFileListener implements ShouldQueue
{
@file_put_contents(storage_path('logs/lyh_error.log'), var_export('进入', true) . PHP_EOL, FILE_APPEND);
$this->param = $event->data;
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($this->param, true) . PHP_EOL, FILE_APPEND);
$imageModel = new ImageModel();
//获取当前项目的所有图片
$imageList = $imageModel->list(['project_id'=>$this->param['project_id'],'is_cos'=>1],'id',['id','path','is_cos']);
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($imageList, true) . PHP_EOL, FILE_APPEND);
if(!empty($imageList)){
$amazonS3Service = new AmazonS3Service();
foreach ($imageList as $k => $v){
... ...