问题描述
问题出现的环境背景及自己尝试过哪些方法
相关代码
// 请把代码文本粘贴到下方(请勿用图片代替代码)
$qiniuDir = config('filesystems.courseware');
$key = "test.txt";
$zipKey = "$qiniuDir/{$cp->zip_name}_test.zip"; // 压缩后的key TODO: _test 后面需要移除
$bucket = getenv('QINIU_OSS_BUCKET_NAME');
$notify_url = null;
$force = false;
$pipeline = 'queue-www-gy720-com'; // 异步任务的队列, 去后台新建: https://portal.qiniu.com/mps/pipeline
$urls = $this->getUrls($cp->json_config_original);
$fops = $this->getFops($urls, $zipKey, $bucket);
//dd($bucket, $key, $pipeline, $notify_url, $force);
list($id, $err) = $this->getPfop()->execute($bucket, $key, $fops, $pipeline, $notify_url, $force);
echo "\n====> pfop mkzip result: \n";
if ($err != null) {
var_dump($err);
} else {
echo "PersistentFop Id: $id\n";
$res = "http://api.qiniu.com/status/get/prefop?id=$id";
echo "Processing result: $res";
}
你期待的结果是什么?实际看到的错误信息又是什么?
- 错误信息: execute fop cmd failed: source data is empty or fail to get source data
- $pipeline 从哪里来的?