Migrate queues to Horizon (#621)

This commit is contained in:
Saeed Vaziry
2025-06-22 11:07:23 +02:00
committed by GitHub
parent e59448d30a
commit 5689e751af
36 changed files with 549 additions and 345 deletions

View File

@ -34,7 +34,7 @@ public function create(Server $server, array $input): FirewallRule
$rule->save();
dispatch(fn () => $this->applyRule($rule));
dispatch(fn () => $this->applyRule($rule))->onQueue('ssh');
return $rule;
}
@ -58,7 +58,7 @@ public function update(FirewallRule $rule, array $input): FirewallRule
'status' => FirewallRuleStatus::UPDATING,
]);
dispatch(fn () => $this->applyRule($rule));
dispatch(fn () => $this->applyRule($rule))->onQueue('ssh');
return $rule;
}
@ -68,7 +68,7 @@ public function delete(FirewallRule $rule): void
$rule->status = FirewallRuleStatus::DELETING;
$rule->save();
dispatch(fn () => $this->applyRule($rule));
dispatch(fn () => $this->applyRule($rule))->onQueue('ssh');
}
protected function applyRule(FirewallRule $rule): void