🗃️ Add priority to queue
This commit is contained in:
parent
7f4f005302
commit
61f9cfb009
7 changed files with 171 additions and 2 deletions
19
app/Queue/DatabaseConnector.php
Normal file
19
app/Queue/DatabaseConnector.php
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
namespace App\Queue;
|
||||
|
||||
use Illuminate\Queue\Connectors\DatabaseConnector as BaseConnector;
|
||||
|
||||
class DatabaseConnector extends BaseConnector
|
||||
{
|
||||
public function connect(array $config)
|
||||
{
|
||||
return new DatabaseQueue(
|
||||
$this->connections->connection($config['connection'] ?? null),
|
||||
$config['table'],
|
||||
$config['queue'],
|
||||
$config['retry_after'] ?? 60,
|
||||
$config['after_commit'] ?? null
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue