mirror of
https://github.com/idanoo/laravel-resque.git
synced 2025-07-02 11:32:14 +00:00
initial commit
This commit is contained in:
parent
81d0771154
commit
c563d0e4ae
7 changed files with 189 additions and 0 deletions
33
src/ResqueManager.php
Normal file
33
src/ResqueManager.php
Normal file
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
namespace Hlgrrnhrdt\Resque;
|
||||
|
||||
use Resque as PhpResque;
|
||||
|
||||
/**
|
||||
* Resque
|
||||
*
|
||||
* @author Holger Reinhardt <hlgrrnhrdt@gmail.com>
|
||||
*/
|
||||
class ResqueManager
|
||||
{
|
||||
/**
|
||||
* @var PhpResque
|
||||
*/
|
||||
private $resque;
|
||||
|
||||
public function __construct(PhpResque $resque)
|
||||
{
|
||||
$this->resque = $resque;
|
||||
}
|
||||
|
||||
public function enqueue(Job $job)
|
||||
{
|
||||
$this->resque->enqueue($job->queue(), get_class($job), $job->arguments());
|
||||
}
|
||||
|
||||
public function enqueueOnce(Job $job)
|
||||
{
|
||||
$queue = new Queue($job->queue());
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue