fix(queue): route scheduled jobs through crons helper

Centralize scheduled job queue selection with crons_queue() and use it for scheduler, task, and database backup jobs so cloud runs on crons while self-hosted stays on high.
This commit is contained in:
Andras Bacsai committed 2026-05-22 16:26:15 +02:00
1 parent e2199f1223
commit fcd63f40eb
5 files changed
+41 -17

No files matched your search

+1 -12
View File
@@ -37,18 +37,7 @@ class ScheduledJobManager implements ShouldQueue
*/
public function __construct()
{
$this->onQueue($this->determineQueue());
}
/**
* On cloud this job runs on a dedicated `crons` queue so it can be drained by an isolated
* Horizon worker pool; self-hosted keeps it on the shared `high` queue. Routing is decided
* by `isCloud()` (config-based), so the dispatching process needs no special env — only
* the worker must be configured to drain `crons` via `HORIZON_QUEUES`.
*/
private function determineQueue(): string
{
return isCloud() ? 'crons' : 'high';
$this->onQueue(crons_queue());
}
/**