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
+11
View File
@@ -57,4 +57,15 @@ class SendLoginNotify implements ShouldQueue
$result = $toolRep->sendMail($user->email, $subject, $body);
do_log(sprintf('user: %s login notify result: %s', $user->username, var_export($result, true)));
}
/**
* Handle a job failure.
*
* @param \Throwable $exception
* @return void
*/
public function failed(\Throwable $exception)
{
do_log("failed: " . $exception->getMessage() . $exception->getTraceAsString(), 'error');
}
}