Skip to content

Commit b717b5b

Browse files
committed
Pulling failed jobs table from config
1 parent 2168886 commit b717b5b

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ build
22
composer.lock
33
docs
44
vendor
5-
coverage
5+
coverage
6+
.envrc

src/FailedJob.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ class FailedJob extends Model
1212

1313
protected $casts = ['failed_at' => 'datetime'];
1414

15+
public function __construct(array $attributes = [])
16+
{
17+
if (config('queue.failed.table')) {
18+
$this->table = config('queue.failed.table');
19+
}
20+
21+
parent::__construct($attributes);
22+
}
23+
1524
public function setPayloadAttribute($payload)
1625
{
1726
$this->attributes['payload'] = serialize($payload);

0 commit comments

Comments
 (0)