class Queue implements ExtenderInterface
Methods
Details
at
line 38
Queue
route(string $jobClass, string $queue)
Route jobs of a class onto a named queue.
The queue is applied when the job is pushed (see {\Flarum\Queue\RoutingQueue}), so dispatch sites do not need to change and the routing decision is not stored on the job class. Routing a base/abstract class covers all of its subclasses: e.g. routing an abstract `GamilyticsJob` sends every job that extends it to that queue. The most specific registered class in a job's hierarchy wins, so a route on a concrete subclass overrides one on its base. An explicit queue passed at push time always takes precedence over any route.