队列相关的调整
This commit is contained in:
@@ -41,8 +41,8 @@ class WechatDraft
|
||||
//更新任务状态
|
||||
$aParam = ['log_id' => $iLogId,'status' => 1,'update_time' => time(),'error' => $sMsg];
|
||||
$oQueueJob->updateLog($aParam);
|
||||
// 记录日志
|
||||
\think\Log::info("WechatDraft-延迟任务执行成功: ".json_encode($data));
|
||||
// // 记录日志
|
||||
// \think\Log::info("WechatDraft-延迟任务执行成功: ".json_encode($data));
|
||||
} catch (\Exception $e) {
|
||||
|
||||
//实例化
|
||||
@@ -52,8 +52,8 @@ class WechatDraft
|
||||
$aParam = ['log_id' => $iLogId,'status' => 2,'update_time' => time(),'error' => $sMsg];
|
||||
$oQueueJob->updateLog($aParam);
|
||||
$job->delete();
|
||||
// 记录错误日志
|
||||
\think\Log::error("WechatDraft-延迟任务失败: ".$e->getMessage());
|
||||
// // 记录错误日志
|
||||
// \think\Log::error("WechatDraft-延迟任务失败: ".$e->getMessage());
|
||||
}finally {
|
||||
gc_collect_cycles(); // 强制垃圾回收
|
||||
}
|
||||
|
||||
@@ -40,8 +40,8 @@ class WechatQueryStatus
|
||||
//更新任务状态
|
||||
$aParam = ['log_id' => $iLogId,'status' => 1,'update_time' => time(),'error' => $sMsg];
|
||||
$oQueueJob->updateLog($aParam);
|
||||
// 记录日志
|
||||
\think\Log::info("WechatQueryStatus延迟任务执行成功: ".json_encode($data));
|
||||
// // 记录日志
|
||||
// \think\Log::info("WechatQueryStatus延迟任务执行成功: ".json_encode($data));
|
||||
} catch (\Exception $e) {
|
||||
|
||||
//实例化
|
||||
@@ -51,8 +51,8 @@ class WechatQueryStatus
|
||||
$aParam = ['log_id' => $iLogId,'status' => 2,'update_time' => time(),'error' => $sMsg];
|
||||
$oQueueJob->updateLog($aParam);
|
||||
$job->delete();
|
||||
// 记录错误日志
|
||||
\think\Log::error("WechatQueryStatus延迟任务失败: ".$e->getMessage());
|
||||
// // 记录错误日志
|
||||
// \think\Log::error("WechatQueryStatus延迟任务失败: ".$e->getMessage());
|
||||
}finally {
|
||||
gc_collect_cycles(); // 强制垃圾回收
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user