You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There has error if insert more than one record into failed_jobs table
error message : duplicate key error collection: life_moments.failed_jobs index: uuid_1 dup key: { uuid: null }
Actual behaviour
Rewrite log method from MongoFailedJobProvider.php
add
public function log($connection, $queue, $payload, $exception)
{
$failed_at = Carbon::now()->getTimestamp();
$uuid = json_decode($payload, true)['uuid'];//add this ,because uuid is unique
$exception = (string) $exception;
$this->getTable()->insert(compact('uuid','connection', 'queue', 'payload', 'failed_at', 'exception'));
}
Logs:
Insert log.txt here (if necessary)
The text was updated successfully, but these errors were encountered:
Description:
Steps to reproduce
1.add a job
2.throw exception in job
3.
Expected behaviour
There has error if insert more than one record into failed_jobs table
error message : duplicate key error collection: life_moments.failed_jobs index: uuid_1 dup key: { uuid: null }
Actual behaviour
Rewrite log method from MongoFailedJobProvider.php
add
public function log($connection, $queue, $payload, $exception)
{
$failed_at = Carbon::now()->getTimestamp();
Logs:
Insert log.txt here (if necessary)The text was updated successfully, but these errors were encountered: