From 1c74fe1be86ba7ba67822125806c46b93de0343f Mon Sep 17 00:00:00 2001 From: Viktor Masicek Date: Fri, 14 Jun 2024 14:10:11 +0200 Subject: [PATCH 1/5] Set max enabled priority --- src/DI/BackgroundQueueExtension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DI/BackgroundQueueExtension.php b/src/DI/BackgroundQueueExtension.php index a6544bc..740eb96 100644 --- a/src/DI/BackgroundQueueExtension.php +++ b/src/DI/BackgroundQueueExtension.php @@ -36,7 +36,7 @@ public function getConfigSchema(): Schema 'locksDir' => Expect::string()->required(), 'queue' => Expect::string()->required(), 'bulkSize' => Expect::int(1)->min(1), - 'priorities' => Expect::arrayOf(Expect::int()->min(1))->default([1])->mergeDefaults(false), + 'priorities' => Expect::arrayOf(Expect::int()->min(1)->max(999))->default([1])->mergeDefaults(false), 'connection' => Expect::anyOf('string', Expect::arrayOf('int|string|object', 'string')), 'tableName' => Expect::string('background_job'), 'producer' => Expect::string()->nullable(), From 2dd23100e696ae55dd5933f06ea399e47d96f040 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Kud=C4=9Blka?= Date: Tue, 14 Jan 2025 18:45:48 +0100 Subject: [PATCH 2/5] fix --- src/DI/BackgroundQueueExtension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DI/BackgroundQueueExtension.php b/src/DI/BackgroundQueueExtension.php index 740eb96..400be52 100644 --- a/src/DI/BackgroundQueueExtension.php +++ b/src/DI/BackgroundQueueExtension.php @@ -37,7 +37,7 @@ public function getConfigSchema(): Schema 'queue' => Expect::string()->required(), 'bulkSize' => Expect::int(1)->min(1), 'priorities' => Expect::arrayOf(Expect::int()->min(1)->max(999))->default([1])->mergeDefaults(false), - 'connection' => Expect::anyOf('string', Expect::arrayOf('int|string|object', 'string')), + 'connection' => Expect::string(), 'tableName' => Expect::string('background_job'), 'producer' => Expect::string()->nullable(), 'waitingJobExpiration' => Expect::int(1000), From 30661165f544735eb0a1f9a179d0f1b7e86d85b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Kud=C4=9Blka?= Date: Sun, 26 Jan 2025 05:43:36 +0100 Subject: [PATCH 3/5] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c74ab25..eaad233 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "license": "MIT", "require": { "php": "^7.4|^8.0", - "adt/background-queue": "^4.22", + "adt/background-queue": "^5.0", "nette/di": "^2.4|^3.0", "nette/schema": "^1.2" }, From c43416619729ff516ad9d0558807bdbfdc36b07b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Kud=C4=9Blka?= Date: Sat, 17 May 2025 17:32:21 +0200 Subject: [PATCH 4/5] Adds auto schema update option Adds a configuration option to enable or disable automatic schema updates. This provides more control over database schema management, allowing users to manage schema updates manually if desired. --- src/DI/BackgroundQueueExtension.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/DI/BackgroundQueueExtension.php b/src/DI/BackgroundQueueExtension.php index 400be52..76cc1f2 100644 --- a/src/DI/BackgroundQueueExtension.php +++ b/src/DI/BackgroundQueueExtension.php @@ -47,6 +47,7 @@ public function getConfigSchema(): Schema 'onAfterProcess' => Expect::type('callable')->nullable(), 'onProcessingGetMetadata' => Expect::type('callable')->nullable(), 'parametersFormat' => Expect::string()->nullable(), + 'autoUpdateSchema' => Expect::bool(true)->required(), ]); } From 21d05f3cd9ccf1910d75d7f81b39bcc5e0fa6c97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Kud=C4=9Blka?= Date: Sat, 18 Oct 2025 07:09:10 +0200 Subject: [PATCH 5/5] Removes redundant schema auto-update Removes the 'autoUpdateSchema' parameter, simplifying configuration and relying on alternative schema management strategies. --- src/DI/BackgroundQueueExtension.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/DI/BackgroundQueueExtension.php b/src/DI/BackgroundQueueExtension.php index 76cc1f2..400be52 100644 --- a/src/DI/BackgroundQueueExtension.php +++ b/src/DI/BackgroundQueueExtension.php @@ -47,7 +47,6 @@ public function getConfigSchema(): Schema 'onAfterProcess' => Expect::type('callable')->nullable(), 'onProcessingGetMetadata' => Expect::type('callable')->nullable(), 'parametersFormat' => Expect::string()->nullable(), - 'autoUpdateSchema' => Expect::bool(true)->required(), ]); }