Allow Shopify worker reuse from central cron
This commit is contained in:
1 parent
85617b5b34
commit
307affbb67
1 file changed
+2
@@ -132,6 +132,7 @@ function shopify_webhook_worker_run(PDO $pdo, array $env, int $limit): array
|
||||
}
|
||||
}
|
||||
|
||||
if (PHP_SAPI === 'cli' && realpath($_SERVER['SCRIPT_FILENAME'] ?? '') === __FILE__) {
|
||||
$argvLimit = 20;
|
||||
foreach ($argv as $argument) {
|
||||
if (str_starts_with($argument, '--limit=')) {
|
||||
@@ -148,3 +149,4 @@ try {
|
||||
fwrite(STDERR, $error->getMessage() . PHP_EOL);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user