We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a997774 commit 82e462bCopy full SHA for 82e462b
src/QueueWorker.php
@@ -12,8 +12,18 @@ public function __construct(
12
private readonly ChildProcessContract $childProcess,
13
) {}
14
15
- public function up(QueueConfig $config): void
+ public function up(string|QueueConfig $config): void
16
{
17
+ if (is_string($config) && config()->has("nativephp.queue_workers.{$config}")) {
18
+ $config = QueueConfig::fromConfigArray([
19
+ $config => config("nativephp.queue_workers.{$config}")
20
+ ])[0];
21
+ }
22
+
23
+ if (! $config instanceof QueueConfig) {
24
+ throw new \InvalidArgumentException("Invalid queue configuration alias [$config]");
25
26
27
$this->childProcess->php(
28
[
29
'-d',
0 commit comments