fahad ashraf
Well-known member
I want to processed some data on background after saving it on database so i create a job
but when i am en-queue this job by using below code
so i am getting error
any one please help me how it will work >??
Code:
class jobclass extends AbstractJob {
public function run($maxRunTime) {
var_dump('test');exit;
}
public function getStatusMessage() {
$actionPhrase = \XF::phrase('sending');
$typePhrase = \XF::phrase('xfrm_resources');
return sprintf('%s... %s (%s/%s)', $actionPhrase, $typePhrase, \XF::language()->numberFormat($this->data['count']), \XF::language()->numberFormat($this->data['total'])
);
}
public function canCancel() {
return true;
}
public function canTriggerByChoice() {
return false;
}
}
but when i am en-queue this job by using below code
Code:
$this->app()->jobManager()->enqueueUnique('xbsend' . $log->log_sms_id, 'XenBulletins\Test:jobclass', [
'log_id' => $log->log_id
]);
so i am getting error
Code:
Could not get runner for job XenBulletins\Test:jobclass (unique: xbsend16). Skipping.
any one please help me how it will work >??