This commit is contained in:
chengxl
2025-07-24 17:22:00 +08:00
parent 52e51cff1d
commit f7df1ae0d7

View File

@@ -300,11 +300,11 @@ class QueueJob
$attempts = $job->attempts(); $attempts = $job->attempts();
if ($attempts >= $this->maxRetries) { if ($attempts >= $this->maxRetries) {
$this->log("超过最大重试次数({$this->maxRetries}),停止重试"); $this->log("超过最大重试次数({$this->maxRetries}),停止重试 | 执行日志:{$sMsg}");
$job->delete(); $job->delete();
} else { } else {
$delay = $this->getRetryDelay($sMsg); $delay = $this->getRetryDelay($sMsg);
$this->log("{$delay}秒后重试({$attempts}/{$this->maxRetries})"); $this->log("{$delay}秒后重试({$attempts}/{$this->maxRetries}) | 执行日志:{$sMsg}");
$job->release($delay); $job->release($delay);
} }
} }
@@ -331,7 +331,7 @@ class QueueJob
} }
$this->QueueRedis->finishJob($sRedisKey, 'failed', 3600); $this->QueueRedis->finishJob($sRedisKey, 'failed', 3600);
$this->log("不可重试错误,直接删除任务"); $this->log("不可重试错误,直接删除任务 | 执行日志:{$sMsg}");
$job->delete(); $job->delete();
} }