Commit 5ac69d48 by wangfa

任务发送,下载回调完成

parent fbe013a5
......@@ -22,6 +22,7 @@ public function handle()
if (filled($data)) {
$data = json_decode($data[1], true);
if (filled($data)) {
$this->info("开始处理消息 {$data['message_content']}");
dispatch(new ReadDiscordMessageJob($data));
}
}
......
......@@ -30,8 +30,8 @@ public function handle()
$data = $result['data'];
$updateData = [
'result_img_status' => TaskService::STATUS_SUCCESS,
'result_img' => $data[0] ?? '',
'cut_status' => TaskService::STATUS_SUCCESS,
'cut_img' => $data[0] ?? '',
];
PromptTask::where('id', $this->data['prompt_id'])
->update($updateData);
......
......@@ -33,8 +33,8 @@ public function handle()
$cachePrompt = Cache::get($key);
if (!empty($cachePrompt)) {
$updateData = [
'cut_status' => TaskService::STATUS_SUCCESS,
'cut_img' => $data['attachment_url'],
'result_img_status' => TaskService::STATUS_SUCCESS,
'result_img' => $data['attachment_url'],
];
PromptTask::where('id', $cachePrompt['prompt_task_id'])
->update($updateData);
......
......@@ -350,9 +350,10 @@ public function create_split_img_task(int $user_id = 0, $data = [])
Redis::rpush('discord_img_split', json_encode($list));
} else {
$downloadData = [
'url' => $prompt->cut_img,
'url' => $prompt->result_img,
'name' => Str::uuid()->toString(),
'index' => $cut_id
'index' => $cut_id,
'prompt_id' => $prompt_id,
];
dispatch(new DownloadImageJob($downloadData));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment