diff --git a/src/QueueCommand.php b/src/QueueCommand.php index 13e829d..8ffbe17 100644 --- a/src/QueueCommand.php +++ b/src/QueueCommand.php @@ -45,6 +45,7 @@ public function getPreparedCommand(callable $wrapper = null): string throw new PhpExecutableNotFound('Unable to find php executable.'); } + $php = str_replace(' ', '\ ', $php); $path = realpath(CRAFT_BASE_PATH); $script = $path . DIRECTORY_SEPARATOR . $this->scriptName; $commandLine = implode(" ", [$php, $script, $this->scriptArgs]); diff --git a/tests/RateLimiterTest.php b/tests/RateLimiterTest.php index 36df1b2..124921a 100644 --- a/tests/RateLimiterTest.php +++ b/tests/RateLimiterTest.php @@ -10,7 +10,7 @@ */ class RateLimiterTest extends TestCase { - public $plugin; + public \ostark\AsyncQueue\Plugin $plugin; public function setUp(): void { diff --git a/tests/_craft/storage/logs/console-2024-04-19.log b/tests/_craft/storage/logs/console-2024-04-19.log new file mode 100644 index 0000000..fb9cef5 --- /dev/null +++ b/tests/_craft/storage/logs/console-2024-04-19.log @@ -0,0 +1,27 @@ +2024-04-19 07:45:38 [console.INFO] [yii\db\Connection::open] Opening DB connection: mysql:host=;dbname=;port=3306 {"memory":9824936} +2024-04-19 07:46:28 [console.INFO] [yii\db\Connection::open] Opening DB connection: mysql:host=;dbname=;port=3306 {"memory":48377888} +2024-04-19 07:46:28 [console.INFO] [yii\db\Connection::open] Opening DB connection: mysql:host=;dbname=;port=3306 {"memory":48378264} +2024-04-19 07:46:34 [console.INFO] [yii\db\Connection::open] Opening DB connection: mysql:host=;dbname=;port=3306 {"memory":48377888} +2024-04-19 07:46:34 [console.INFO] [yii\db\Connection::open] Opening DB connection: mysql:host=;dbname=;port=3306 {"memory":48378304} +2024-04-19 07:46:35 [console.INFO] [yii\db\Connection::open] Opening DB connection: mysql:host=;dbname=;port=3306 {"memory":48377888} +2024-04-19 07:46:35 [console.INFO] [yii\db\Connection::open] Opening DB connection: mysql:host=;dbname=;port=3306 {"memory":48378304} +2024-04-19 07:47:06 [console.INFO] [yii\db\Connection::open] Opening DB connection: mysql:host=;dbname=;port=3306 {"memory":48377888} +2024-04-19 07:47:06 [console.INFO] [yii\db\Connection::open] Opening DB connection: mysql:host=;dbname=;port=3306 {"memory":48378296} +2024-04-19 07:47:11 [console.INFO] [yii\db\Connection::open] Opening DB connection: mysql:host=;dbname=;port=3306 {"memory":48377952} +2024-04-19 07:47:11 [console.INFO] [yii\db\Connection::open] Opening DB connection: mysql:host=;dbname=;port=3306 {"memory":48378368} +2024-04-19 07:47:15 [console.INFO] [yii\db\Connection::open] Opening DB connection: mysql:host=;dbname=;port=3306 {"memory":48377952} +2024-04-19 07:47:15 [console.INFO] [yii\db\Connection::open] Opening DB connection: mysql:host=;dbname=;port=3306 {"memory":48378368} +2024-04-19 07:47:38 [console.INFO] [yii\db\Connection::open] Opening DB connection: mysql:host=;dbname=;port=3306 {"memory":48377952} +2024-04-19 07:47:38 [console.INFO] [yii\db\Connection::open] Opening DB connection: mysql:host=;dbname=;port=3306 {"memory":48378368} +2024-04-19 07:47:42 [console.INFO] [yii\db\Connection::open] Opening DB connection: mysql:host=;dbname=;port=3306 {"memory":48377888} +2024-04-19 07:47:42 [console.INFO] [yii\db\Connection::open] Opening DB connection: mysql:host=;dbname=;port=3306 {"memory":48378304} +2024-04-19 07:47:54 [console.INFO] [yii\db\Connection::open] Opening DB connection: mysql:host=;dbname=;port=3306 {"memory":48377888} +2024-04-19 07:47:54 [console.INFO] [yii\db\Connection::open] Opening DB connection: mysql:host=;dbname=;port=3306 {"memory":48378304} +2024-04-19 07:47:55 [console.INFO] [yii\db\Connection::open] Opening DB connection: mysql:host=;dbname=;port=3306 {"memory":48377888} +2024-04-19 07:47:55 [console.INFO] [yii\db\Connection::open] Opening DB connection: mysql:host=;dbname=;port=3306 {"memory":48378304} +2024-04-19 07:48:00 [console.INFO] [yii\db\Connection::open] Opening DB connection: mysql:host=;dbname=;port=3306 {"memory":8712496} +2024-04-19 07:48:00 [console.INFO] [yii\db\Connection::open] Opening DB connection: mysql:host=;dbname=;port=3306 {"memory":9824936} +2024-04-19 07:48:03 [console.INFO] [yii\db\Connection::open] Opening DB connection: mysql:host=;dbname=;port=3306 {"memory":48377888} +2024-04-19 07:48:03 [console.INFO] [yii\db\Connection::open] Opening DB connection: mysql:host=;dbname=;port=3306 {"memory":48378304} +2024-04-19 07:48:20 [console.INFO] [yii\db\Connection::open] Opening DB connection: mysql:host=;dbname=;port=3306 {"memory":8712488} +2024-04-19 07:48:20 [console.INFO] [yii\db\Connection::open] Opening DB connection: mysql:host=;dbname=;port=3306 {"memory":8712488} diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 6aa2fb5..3a736a6 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -29,6 +29,7 @@ $configService->appDefaultsDir = dirname(__DIR__) . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . 'config' . DIRECTORY_SEPARATOR . 'defaults'; $generalConfig = $configService->getConfigFromFile('general'); +/** @var array{class: class-string, array} $config */ $config = \craft\helpers\ArrayHelper::merge( [ 'vendorPath' => CRAFT_VENDOR_PATH,