diff --git a/composer.json b/composer.json index e3680c3..eaad233 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "license": "MIT", "require": { "php": "^7.4|^8.0", - "adt/background-queue": "^4.21", + "adt/background-queue": "^5.0", "nette/di": "^2.4|^3.0", "nette/schema": "^1.2" }, diff --git a/src/DI/BackgroundQueueExtension.php b/src/DI/BackgroundQueueExtension.php index ee99f11..400be52 100644 --- a/src/DI/BackgroundQueueExtension.php +++ b/src/DI/BackgroundQueueExtension.php @@ -35,8 +35,9 @@ public function getConfigSchema(): Schema 'tempDir' => Expect::string()->required(), 'locksDir' => Expect::string()->required(), 'queue' => Expect::string()->required(), - 'priorities' => Expect::arrayOf(Expect::int()->min(1))->default([1])->mergeDefaults(false), - 'connection' => Expect::anyOf('string', Expect::arrayOf('int|string|object', 'string')), + 'bulkSize' => Expect::int(1)->min(1), + 'priorities' => Expect::arrayOf(Expect::int()->min(1)->max(999))->default([1])->mergeDefaults(false), + 'connection' => Expect::string(), 'tableName' => Expect::string('background_job'), 'producer' => Expect::string()->nullable(), 'waitingJobExpiration' => Expect::int(1000), @@ -45,6 +46,7 @@ public function getConfigSchema(): Schema 'onError' => Expect::type('callable')->nullable(), 'onAfterProcess' => Expect::type('callable')->nullable(), 'onProcessingGetMetadata' => Expect::type('callable')->nullable(), + 'parametersFormat' => Expect::string()->nullable(), ]); }