mirror of
https://github.com/idanoo/php-resque.git
synced 2024-11-22 08:15:14 +00:00
call beforePerform before retrieving an instance of the job class
This commit is contained in:
parent
610c4dcdbf
commit
0327217907
@ -186,10 +186,10 @@ class Resque_Job
|
|||||||
*/
|
*/
|
||||||
public function perform()
|
public function perform()
|
||||||
{
|
{
|
||||||
$instance = $this->getInstance();
|
|
||||||
try {
|
try {
|
||||||
Resque_Event::trigger('beforePerform', $this);
|
Resque_Event::trigger('beforePerform', $this);
|
||||||
|
|
||||||
|
$instance = $this->getInstance();
|
||||||
if(method_exists($instance, 'setUp')) {
|
if(method_exists($instance, 'setUp')) {
|
||||||
$instance->setUp();
|
$instance->setUp();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user