Closed vamsiikrishna closed 10 years ago
it will be BCC\ResqueBundle\Resque
so you can add jobs like this:
use BCC\ResqueBundle\Resque;
use BCC\ResqueBundle\job;
// ...
public function __construct(Resque $resque)
{
$this->resque = $resque;
}
public function addJob()
{
$this->resque->enqueue(new Job());
}
If you are ever in doubt about which class is injected into a method, you can always use get_class($somevar)
to get it.
@mrbase thanks a lot !
no problem, will close this
Hi,
I am able to create jobs from the controller, but how do I create a job from a service ?
I am trying to pass
@bcc_resque.resque
in the arguments field of my service declaration, but not sure which class would be sent as arguments in the service constructor .Thanks