job add failed log

This commit is contained in:
xiaomlove
2023-03-04 01:13:41 +08:00
parent 285c6defdf
commit bee8234f19
3 changed files with 33 additions and 0 deletions

View File

@@ -92,4 +92,15 @@ class UpdateUserSeedingLeechingTime implements ShouldQueue
$costTime = time() - $beginTimestamp;
do_log("$logPrefix, [DONE], user total count: " . count($users) . ", success update count: $count, cost time: $costTime seconds");
}
/**
* Handle a job failure.
*
* @param \Throwable $exception
* @return void
*/
public function failed(\Throwable $exception)
{
do_log("failed: " . $exception->getMessage() . $exception->getTraceAsString(), 'error');
}
}