Skip to content

Commit d4656bf

Browse files
committed
Compatible with older versions
1 parent 362fbc0 commit d4656bf

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/Task/SwooleTaskJob.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,20 @@ public function __construct(Container $container, $swoole, $job, $taskId, $srcWr
5353
$this->srcWorkderId = $srcWrokerId;
5454
}
5555

56+
/**
57+
* Fire the job.
58+
*
59+
* @return void
60+
*/
61+
public function fire()
62+
{
63+
if (method_exists($this, 'resolveAndFire')) {
64+
$this->resolveAndFire(json_decode($this->getRawBody(), true));
65+
} else {
66+
parent::fire();
67+
}
68+
}
69+
5670
/**
5771
* Get the number of times the job has been attempted.
5872
* @return int

0 commit comments

Comments
 (0)