TaskInterface
in
Any task needs to at least implement run().
The add() is mainly only for CLI adding purposes and optional.
Either throw an exception with an error message, or use $this->abort('My message'); to fail a job.
Tags
Table of Contents
Methods
- run() : void
- Main execution of the task.
Methods
run()
Main execution of the task.
public
run(array<string, mixed> $data, int $jobId) : void
Parameters
- $data : array<string, mixed>
-
The array passed to QueuedJobsTable::createJob()
- $jobId : int
-
The id of the QueuedJob entity