From 07033c55b683e26f58c3313668caaeca4afc89ad Mon Sep 17 00:00:00 2001 From: Viktor Masicek Date: Fri, 24 May 2024 17:06:14 +0200 Subject: [PATCH 1/8] =?UTF-8?q?Podpora=20d=C3=A1vkov=C3=A9ho=20vkl=C3=A1d?= =?UTF-8?q?=C3=A1n=C3=AD=20z=C3=A1znam=C5=AF=20do=20DB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/DI/BackgroundQueueExtension.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/DI/BackgroundQueueExtension.php b/src/DI/BackgroundQueueExtension.php index ee99f11..7781dbb 100644 --- a/src/DI/BackgroundQueueExtension.php +++ b/src/DI/BackgroundQueueExtension.php @@ -35,6 +35,7 @@ public function getConfigSchema(): Schema 'tempDir' => Expect::string()->required(), '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), 'connection' => Expect::anyOf('string', Expect::arrayOf('int|string|object', 'string')), 'tableName' => Expect::string('background_job'), From a04170e73a9ce745320191be37ed5a156be8d40b Mon Sep 17 00:00:00 2001 From: Viktor Masicek Date: Fri, 24 May 2024 17:06:20 +0200 Subject: [PATCH 2/8] =?UTF-8?q?Podpora=20ukl=C3=A1d=C3=A1n=C3=AD=20paramet?= =?UTF-8?q?r=C5=AF=20pro=20spu=C5=A1t=C4=9Bn=C3=AD=20jobu=20ve=20form?= =?UTF-8?q?=C3=A1tu=20JSON?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/DI/BackgroundQueueExtension.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/DI/BackgroundQueueExtension.php b/src/DI/BackgroundQueueExtension.php index 7781dbb..a6544bc 100644 --- a/src/DI/BackgroundQueueExtension.php +++ b/src/DI/BackgroundQueueExtension.php @@ -46,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(), ]); } From d244a23bc7bd4bb6bd3ef2be482da4bebf76c83f Mon Sep 17 00:00:00 2001 From: Viktor Masicek Date: Fri, 24 May 2024 17:10:08 +0200 Subject: [PATCH 3/8] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index e3680c3..c74ab25 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": "^4.22", "nette/di": "^2.4|^3.0", "nette/schema": "^1.2" }, From 1c74fe1be86ba7ba67822125806c46b93de0343f Mon Sep 17 00:00:00 2001 From: Viktor Masicek Date: Fri, 14 Jun 2024 14:10:11 +0200 Subject: [PATCH 4/8] 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 5/8] 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 6/8] 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 7/8] 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 8/8] 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(), ]); }