mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
chore: upgrade queue to 2.0
This commit is contained in:
1 parent
fafb74f205
commit
73fb8b14fc
29 files changed
+95
-95
No files matched your search
@@ -48,7 +48,7 @@ use Utopia\Pools\Adapter\Swoole as SwoolePoolAdapter;
|
||||
use Utopia\Pools\Group;
|
||||
use Utopia\Pools\Pool as Connections;
|
||||
use Utopia\Queue\Broker\Pool as BrokerPool;
|
||||
use Utopia\Queue\Publisher;
|
||||
use Utopia\Queue\Publisher\Synchronous as Publisher;
|
||||
use Utopia\Queue\Queue;
|
||||
use Utopia\Storage\Device;
|
||||
use Utopia\Storage\Device\AWS;
|
||||
|
||||
@@ -55,7 +55,7 @@ use Utopia\Lock\Distributed as DistributedLock;
|
||||
use Utopia\Logger\Log;
|
||||
use Utopia\Logger\Logger;
|
||||
use Utopia\Pools\Group;
|
||||
use Utopia\Queue\Publisher;
|
||||
use Utopia\Queue\Publisher\Synchronous as Publisher;
|
||||
use Utopia\Queue\Queue;
|
||||
use Utopia\Storage\Device;
|
||||
use Utopia\System\System;
|
||||
|
||||
@@ -21,7 +21,7 @@ use Utopia\Database\Validator\Authorization;
|
||||
use Utopia\DI\Container;
|
||||
use Utopia\Logger\Log;
|
||||
use Utopia\Pools\Group;
|
||||
use Utopia\Queue\Publisher;
|
||||
use Utopia\Queue\Publisher\Synchronous as Publisher;
|
||||
use Utopia\Queue\Queue;
|
||||
use Utopia\Registry\Registry;
|
||||
use Utopia\Span\Span;
|
||||
|
||||
+2
-2
@@ -94,10 +94,10 @@
|
||||
"utopia-php/logger": "0.8.*",
|
||||
"utopia-php/messaging": "^2.1",
|
||||
"utopia-php/migration": "^2.0.0",
|
||||
"utopia-php/platform": "1.0.0-rc18",
|
||||
"utopia-php/platform": "1.0.0-rc20",
|
||||
"utopia-php/pools": "2.*",
|
||||
"utopia-php/span": "^4.2",
|
||||
"utopia-php/queue": "^1.3.0",
|
||||
"utopia-php/queue": "^2.0.0",
|
||||
"utopia-php/servers": "0.4.*",
|
||||
"utopia-php/registry": "0.5.*",
|
||||
"utopia-php/storage": "^4.0",
|
||||
|
||||
Generated
+60
-60
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "9a90a09be089e0d25f24de920758e2de",
|
||||
"content-hash": "5b23ea5ac37704e78ab49bfc83818f42",
|
||||
"packages": [
|
||||
{
|
||||
"name": "adhocore/jwt",
|
||||
@@ -3388,16 +3388,16 @@
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/cli",
|
||||
"version": "0.24.3",
|
||||
"version": "0.24.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/cli.git",
|
||||
"reference": "d6a27f2902e777c2985e834ffb3e662130fd7ecc"
|
||||
"reference": "39d590ffe67b0d63f107ad45533a85163899bc08"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/cli/zipball/d6a27f2902e777c2985e834ffb3e662130fd7ecc",
|
||||
"reference": "d6a27f2902e777c2985e834ffb3e662130fd7ecc",
|
||||
"url": "https://api.github.com/repos/utopia-php/cli/zipball/39d590ffe67b0d63f107ad45533a85163899bc08",
|
||||
"reference": "39d590ffe67b0d63f107ad45533a85163899bc08",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3429,9 +3429,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/cli/issues",
|
||||
"source": "https://github.com/utopia-php/cli/tree/0.24.3"
|
||||
"source": "https://github.com/utopia-php/cli/tree/0.24.4"
|
||||
},
|
||||
"time": "2026-06-26T10:48:18+00:00"
|
||||
"time": "2026-09-02T15:57:19+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/client",
|
||||
@@ -3492,16 +3492,16 @@
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/compression",
|
||||
"version": "0.1.7",
|
||||
"version": "0.1.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/compression.git",
|
||||
"reference": "655adbd2e42ba28f3148e0aaaf03a68dd6a1bd44"
|
||||
"reference": "8a23fdec63623aa6ad64ed764d688e67cf2c110e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/compression/zipball/655adbd2e42ba28f3148e0aaaf03a68dd6a1bd44",
|
||||
"reference": "655adbd2e42ba28f3148e0aaaf03a68dd6a1bd44",
|
||||
"url": "https://api.github.com/repos/utopia-php/compression/zipball/8a23fdec63623aa6ad64ed764d688e67cf2c110e",
|
||||
"reference": "8a23fdec63623aa6ad64ed764d688e67cf2c110e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3535,9 +3535,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/compression/issues",
|
||||
"source": "https://github.com/utopia-php/compression/tree/0.1.7"
|
||||
"source": "https://github.com/utopia-php/compression/tree/0.1.8"
|
||||
},
|
||||
"time": "2026-06-26T10:48:18+00:00"
|
||||
"time": "2026-09-02T15:57:19+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/config",
|
||||
@@ -3741,16 +3741,16 @@
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/di",
|
||||
"version": "0.3.5",
|
||||
"version": "0.3.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/di.git",
|
||||
"reference": "053ebd097963190c5b279d66c5b530acb584d8c0"
|
||||
"reference": "a72d8ee141c0883145876da95b527ffdff7ae2a9"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/di/zipball/053ebd097963190c5b279d66c5b530acb584d8c0",
|
||||
"reference": "053ebd097963190c5b279d66c5b530acb584d8c0",
|
||||
"url": "https://api.github.com/repos/utopia-php/di/zipball/a72d8ee141c0883145876da95b527ffdff7ae2a9",
|
||||
"reference": "a72d8ee141c0883145876da95b527ffdff7ae2a9",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -3783,9 +3783,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/di/issues",
|
||||
"source": "https://github.com/utopia-php/di/tree/0.3.5"
|
||||
"source": "https://github.com/utopia-php/di/tree/0.3.6"
|
||||
},
|
||||
"time": "2026-06-26T10:48:18+00:00"
|
||||
"time": "2026-09-02T15:57:19+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/dns",
|
||||
@@ -4476,16 +4476,16 @@
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/platform",
|
||||
"version": "1.0.0-rc18",
|
||||
"version": "1.0.0-rc20",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/platform.git",
|
||||
"reference": "aab0b18f26cf851e8f48d6a6bb36e92ed597ce50"
|
||||
"reference": "746d403d417bb8ae42e5f8d94e1bbe0e75e4c87d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/platform/zipball/aab0b18f26cf851e8f48d6a6bb36e92ed597ce50",
|
||||
"reference": "aab0b18f26cf851e8f48d6a6bb36e92ed597ce50",
|
||||
"url": "https://api.github.com/repos/utopia-php/platform/zipball/746d403d417bb8ae42e5f8d94e1bbe0e75e4c87d",
|
||||
"reference": "746d403d417bb8ae42e5f8d94e1bbe0e75e4c87d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -4494,7 +4494,7 @@
|
||||
"php": ">=8.5",
|
||||
"utopia-php/cli": "^0.24",
|
||||
"utopia-php/http": "^2.0@RC",
|
||||
"utopia-php/queue": "0.23.* || 0.24.* || ^1.0.0",
|
||||
"utopia-php/queue": "0.23.* || 0.24.* || ^1.0.0 || ^2.0.0",
|
||||
"utopia-php/servers": "^0.4"
|
||||
},
|
||||
"type": "library",
|
||||
@@ -4517,22 +4517,22 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/platform/issues",
|
||||
"source": "https://github.com/utopia-php/platform/tree/1.0.0-rc18"
|
||||
"source": "https://github.com/utopia-php/platform/tree/1.0.0-rc20"
|
||||
},
|
||||
"time": "2026-08-18T15:36:41+00:00"
|
||||
"time": "2026-09-04T17:01:57+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/pools",
|
||||
"version": "2.0.2",
|
||||
"version": "2.1.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/pools.git",
|
||||
"reference": "86d43fcacd125232c0743e8c22695faf97285cf3"
|
||||
"reference": "bc689b818fe1de0df72db6e51ab2f52b838b1209"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/pools/zipball/86d43fcacd125232c0743e8c22695faf97285cf3",
|
||||
"reference": "86d43fcacd125232c0743e8c22695faf97285cf3",
|
||||
"url": "https://api.github.com/repos/utopia-php/pools/zipball/bc689b818fe1de0df72db6e51ab2f52b838b1209",
|
||||
"reference": "bc689b818fe1de0df72db6e51ab2f52b838b1209",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -4573,22 +4573,22 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/pools/issues",
|
||||
"source": "https://github.com/utopia-php/pools/tree/2.0.2"
|
||||
"source": "https://github.com/utopia-php/pools/tree/2.1.1"
|
||||
},
|
||||
"time": "2026-08-05T18:07:20+00:00"
|
||||
"time": "2026-09-02T15:57:19+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/psr7",
|
||||
"version": "0.2.1",
|
||||
"version": "0.2.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/psr7.git",
|
||||
"reference": "7d3f88b9ee0b57237547eef634dbb5399b2a907e"
|
||||
"reference": "cf70bec9ae4cda33bba01c8f7f2194d32adf899d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/psr7/zipball/7d3f88b9ee0b57237547eef634dbb5399b2a907e",
|
||||
"reference": "7d3f88b9ee0b57237547eef634dbb5399b2a907e",
|
||||
"url": "https://api.github.com/repos/utopia-php/psr7/zipball/cf70bec9ae4cda33bba01c8f7f2194d32adf899d",
|
||||
"reference": "cf70bec9ae4cda33bba01c8f7f2194d32adf899d",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -4619,9 +4619,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/psr7/issues",
|
||||
"source": "https://github.com/utopia-php/psr7/tree/0.2.1"
|
||||
"source": "https://github.com/utopia-php/psr7/tree/0.2.2"
|
||||
},
|
||||
"time": "2026-08-25T12:45:40+00:00"
|
||||
"time": "2026-09-02T15:57:19+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/query",
|
||||
@@ -4674,31 +4674,31 @@
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/queue",
|
||||
"version": "1.5.2",
|
||||
"version": "2.0.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/queue.git",
|
||||
"reference": "4cdaf1b193db4934a65720ecd3be9bf109821cfd"
|
||||
"reference": "4c06e4ac7b0f478194fd8517afc285ccb7472312"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/queue/zipball/4cdaf1b193db4934a65720ecd3be9bf109821cfd",
|
||||
"reference": "4cdaf1b193db4934a65720ecd3be9bf109821cfd",
|
||||
"url": "https://api.github.com/repos/utopia-php/queue/zipball/4c06e4ac7b0f478194fd8517afc285ccb7472312",
|
||||
"reference": "4c06e4ac7b0f478194fd8517afc285ccb7472312",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=8.5",
|
||||
"utopia-php/di": "^0.3",
|
||||
"utopia-php/lock": "^0.3",
|
||||
"utopia-php/pools": "^2.0",
|
||||
"utopia-php/pools": "^2.1",
|
||||
"utopia-php/servers": "^0.4",
|
||||
"utopia-php/telemetry": "^0.4",
|
||||
"utopia-php/validators": "^0.6"
|
||||
"utopia-php/validators": "^0.6 || ^1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-redis": "*",
|
||||
"swoole/ide-helper": "4.8.8",
|
||||
"utopia-php/nats": "^1.0.0",
|
||||
"utopia-php/nats": "^1.2",
|
||||
"workerman/workerman": "^4.0"
|
||||
},
|
||||
"suggest": {
|
||||
@@ -4734,9 +4734,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/queue/issues",
|
||||
"source": "https://github.com/utopia-php/queue/tree/1.5.2"
|
||||
"source": "https://github.com/utopia-php/queue/tree/2.0.1"
|
||||
},
|
||||
"time": "2026-08-28T13:38:02+00:00"
|
||||
"time": "2026-09-04T18:45:16+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/registry",
|
||||
@@ -5038,16 +5038,16 @@
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/system",
|
||||
"version": "0.10.5",
|
||||
"version": "0.10.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/system.git",
|
||||
"reference": "57a2ab17f5346f171c796e29a6c2202bfaa21303"
|
||||
"reference": "bd8f35619c7b69360689467f25e1b608cc3ba6b5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/system/zipball/57a2ab17f5346f171c796e29a6c2202bfaa21303",
|
||||
"reference": "57a2ab17f5346f171c796e29a6c2202bfaa21303",
|
||||
"url": "https://api.github.com/repos/utopia-php/system/zipball/bd8f35619c7b69360689467f25e1b608cc3ba6b5",
|
||||
"reference": "bd8f35619c7b69360689467f25e1b608cc3ba6b5",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -5083,22 +5083,22 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/system/issues",
|
||||
"source": "https://github.com/utopia-php/system/tree/0.10.5"
|
||||
"source": "https://github.com/utopia-php/system/tree/0.10.6"
|
||||
},
|
||||
"time": "2026-06-26T10:48:18+00:00"
|
||||
"time": "2026-09-02T15:57:19+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/telemetry",
|
||||
"version": "0.4.7",
|
||||
"version": "0.4.8",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/telemetry.git",
|
||||
"reference": "186dc1c1f92fbd15a1aa6a63515d0f4251dc88ff"
|
||||
"reference": "6fb0bb579b3e249be720010bc12434c2ec6194bb"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/telemetry/zipball/186dc1c1f92fbd15a1aa6a63515d0f4251dc88ff",
|
||||
"reference": "186dc1c1f92fbd15a1aa6a63515d0f4251dc88ff",
|
||||
"url": "https://api.github.com/repos/utopia-php/telemetry/zipball/6fb0bb579b3e249be720010bc12434c2ec6194bb",
|
||||
"reference": "6fb0bb579b3e249be720010bc12434c2ec6194bb",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -5134,9 +5134,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/utopia-php/telemetry/issues",
|
||||
"source": "https://github.com/utopia-php/telemetry/tree/0.4.7"
|
||||
"source": "https://github.com/utopia-php/telemetry/tree/0.4.8"
|
||||
},
|
||||
"time": "2026-08-26T17:59:59+00:00"
|
||||
"time": "2026-09-02T15:57:19+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/usage",
|
||||
@@ -8666,5 +8666,5 @@
|
||||
"platform-dev": {
|
||||
"ext-fileinfo": "*"
|
||||
},
|
||||
"plugin-api-version": "2.6.0"
|
||||
"plugin-api-version": "2.9.0"
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace Appwrite\Event;
|
||||
|
||||
use Utopia\Database\Document;
|
||||
use Utopia\Queue\Publisher;
|
||||
use Utopia\Queue\Publisher\Synchronous as Publisher;
|
||||
use Utopia\System\System;
|
||||
|
||||
class Certificate extends Event
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace Appwrite\Event;
|
||||
|
||||
use Utopia\Database\Document;
|
||||
use Utopia\DSN\DSN;
|
||||
use Utopia\Queue\Publisher;
|
||||
use Utopia\Queue\Publisher\Synchronous as Publisher;
|
||||
use Utopia\System\System;
|
||||
|
||||
class Database extends Event
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace Appwrite\Event;
|
||||
|
||||
use InvalidArgumentException;
|
||||
use Utopia\Database\Document;
|
||||
use Utopia\Queue\Publisher;
|
||||
use Utopia\Queue\Publisher\Synchronous as Publisher;
|
||||
use Utopia\Queue\Queue;
|
||||
|
||||
class Event
|
||||
@@ -364,7 +364,7 @@ class Event
|
||||
$payload = array_merge($this->preparePayload(), $this->trimPayload());
|
||||
|
||||
try {
|
||||
return $this->publisher->enqueue($queue, $payload);
|
||||
return $this->publisher->publish($queue, $payload);
|
||||
} catch (\Throwable $th) {
|
||||
if ($this->critical) {
|
||||
throw $th;
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace Appwrite\Event\Publisher;
|
||||
|
||||
use Appwrite\Event\Message\Audit as AuditMessage;
|
||||
use Utopia\Console;
|
||||
use Utopia\Queue\Publisher;
|
||||
use Utopia\Queue\Publisher\Synchronous as Publisher;
|
||||
use Utopia\Queue\Queue;
|
||||
use Utopia\System\System;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace Appwrite\Event\Publisher;
|
||||
|
||||
use Appwrite\Event\Message\Base as BaseMessage;
|
||||
use Utopia\Queue\Publisher;
|
||||
use Utopia\Queue\Publisher\Synchronous as Publisher;
|
||||
use Utopia\Queue\Queue;
|
||||
|
||||
readonly class Base
|
||||
@@ -20,7 +20,7 @@ readonly class Base
|
||||
{
|
||||
$payload = $message->toArray();
|
||||
|
||||
return $this->publisher->enqueue($queue, $payload);
|
||||
return $this->publisher->publish($queue, $payload);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace Appwrite\Event\Publisher;
|
||||
|
||||
use Appwrite\Event\Message\Build as BuildMessage;
|
||||
use Utopia\Queue\Publisher;
|
||||
use Utopia\Queue\Publisher\Synchronous as Publisher;
|
||||
use Utopia\Queue\Queue;
|
||||
|
||||
readonly class Build extends Base
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace Appwrite\Event\Publisher;
|
||||
|
||||
use Appwrite\Event\Message\Certificate as CertificateMessage;
|
||||
use Utopia\Queue\Publisher;
|
||||
use Utopia\Queue\Publisher\Synchronous as Publisher;
|
||||
use Utopia\Queue\Queue;
|
||||
|
||||
readonly class Certificate extends Base
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace Appwrite\Event\Publisher;
|
||||
use Appwrite\Event\Message\Database as DatabaseMessage;
|
||||
use Utopia\Database\Document;
|
||||
use Utopia\DSN\DSN;
|
||||
use Utopia\Queue\Publisher;
|
||||
use Utopia\Queue\Publisher\Synchronous as Publisher;
|
||||
use Utopia\Queue\Queue;
|
||||
|
||||
readonly class Database extends Base
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace Appwrite\Event\Publisher;
|
||||
|
||||
use Appwrite\Event\Message\Delete as DeleteMessage;
|
||||
use Utopia\Queue\Publisher;
|
||||
use Utopia\Queue\Publisher\Synchronous as Publisher;
|
||||
use Utopia\Queue\Queue;
|
||||
|
||||
readonly class Delete extends Base
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace Appwrite\Event\Publisher;
|
||||
use Appwrite\Event\Message\Execution as ExecutionMessage;
|
||||
use Appwrite\Event\Message\ExecutionCancelled as ExecutionCancelledMessage;
|
||||
use Appwrite\Event\Message\Executions as ExecutionsMessage;
|
||||
use Utopia\Queue\Publisher;
|
||||
use Utopia\Queue\Publisher\Synchronous as Publisher;
|
||||
use Utopia\Queue\Queue;
|
||||
|
||||
readonly class Execution extends Base
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace Appwrite\Event\Publisher;
|
||||
|
||||
use Appwrite\Event\Message\Func as FunctionMessage;
|
||||
use Utopia\Queue\Publisher;
|
||||
use Utopia\Queue\Publisher\Synchronous as Publisher;
|
||||
use Utopia\Queue\Queue;
|
||||
|
||||
readonly class Func extends Base
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace Appwrite\Event\Publisher;
|
||||
|
||||
use Appwrite\Event\Message\Jobs as JobsMessage;
|
||||
use Utopia\Queue\Publisher;
|
||||
use Utopia\Queue\Publisher\Synchronous as Publisher;
|
||||
use Utopia\Queue\Queue;
|
||||
|
||||
readonly class Jobs extends Base
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace Appwrite\Event\Publisher;
|
||||
|
||||
use Appwrite\Event\Message\Mail as MailMessage;
|
||||
use Utopia\Queue\Publisher;
|
||||
use Utopia\Queue\Publisher\Synchronous as Publisher;
|
||||
use Utopia\Queue\Queue;
|
||||
|
||||
readonly class Mail extends Base
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace Appwrite\Event\Publisher;
|
||||
|
||||
use Appwrite\Event\Message\Messaging as MessagingMessage;
|
||||
use Utopia\Queue\Publisher;
|
||||
use Utopia\Queue\Publisher\Synchronous as Publisher;
|
||||
use Utopia\Queue\Queue;
|
||||
|
||||
readonly class Messaging extends Base
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace Appwrite\Event\Publisher;
|
||||
|
||||
use Appwrite\Event\Message\Migration as MigrationMessage;
|
||||
use Utopia\Queue\Publisher;
|
||||
use Utopia\Queue\Publisher\Synchronous as Publisher;
|
||||
use Utopia\Queue\Queue;
|
||||
|
||||
readonly class Migration extends Base
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace Appwrite\Event\Publisher;
|
||||
|
||||
use Appwrite\Event\Message\Notification as NotificationMessage;
|
||||
use Utopia\Queue\Publisher;
|
||||
use Utopia\Queue\Publisher\Synchronous as Publisher;
|
||||
use Utopia\Queue\Queue;
|
||||
|
||||
readonly class Notification extends Base
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace Appwrite\Event\Publisher;
|
||||
|
||||
use Appwrite\Event\Message\Screenshot as ScreenshotMessage;
|
||||
use Utopia\Queue\Publisher;
|
||||
use Utopia\Queue\Publisher\Synchronous as Publisher;
|
||||
use Utopia\Queue\Queue;
|
||||
|
||||
readonly class Screenshot extends Base
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace Appwrite\Event\Publisher;
|
||||
|
||||
use Appwrite\Event\Message\StatsResources as StatsResourcesMessage;
|
||||
use Utopia\Console;
|
||||
use Utopia\Queue\Publisher;
|
||||
use Utopia\Queue\Publisher\Synchronous as Publisher;
|
||||
use Utopia\Queue\Queue;
|
||||
use Utopia\System\System;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace Appwrite\Event\Publisher;
|
||||
|
||||
use Appwrite\Event\Message\Usage as UsageMessage;
|
||||
use Utopia\Console;
|
||||
use Utopia\Queue\Publisher;
|
||||
use Utopia\Queue\Publisher\Synchronous as Publisher;
|
||||
use Utopia\Queue\Queue;
|
||||
use Utopia\System\System;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace Appwrite\Event;
|
||||
|
||||
use Utopia\Queue\Publisher;
|
||||
use Utopia\Queue\Publisher\Synchronous as Publisher;
|
||||
use Utopia\System\System;
|
||||
|
||||
class Webhook extends Event
|
||||
|
||||
@@ -4,7 +4,7 @@ namespace Appwrite\Platform\Tasks;
|
||||
|
||||
use Utopia\Console;
|
||||
use Utopia\Platform\Action;
|
||||
use Utopia\Queue\Publisher;
|
||||
use Utopia\Queue\Publisher\Synchronous as Publisher;
|
||||
use Utopia\Queue\Queue;
|
||||
use Utopia\Validator\Text;
|
||||
use Utopia\Validator\Wildcard;
|
||||
|
||||
@@ -73,8 +73,8 @@ final class WorkerConcurrencyTest extends TestCase
|
||||
$pendingDuringFirstMessage = null;
|
||||
|
||||
\Swoole\Coroutine\run(function () use ($broker, $queue, &$processed, &$pendingDuringFirstMessage): void {
|
||||
$broker->enqueue($queue, ['n' => 0]);
|
||||
$broker->enqueue($queue, ['n' => 1]);
|
||||
$broker->publish($queue, ['n' => 0]);
|
||||
$broker->publish($queue, ['n' => 1]);
|
||||
|
||||
$adapter = new Swoole($broker, 1, self::NAMESPACE);
|
||||
|
||||
@@ -133,7 +133,7 @@ final class WorkerConcurrencyTest extends TestCase
|
||||
foreach ($queues as $spec) {
|
||||
$queue = new Queue($spec['name'], self::NAMESPACE);
|
||||
for ($i = 0; $i < $spec['messages']; $i++) {
|
||||
$broker->enqueue($queue, ['n' => $i]);
|
||||
$broker->publish($queue, ['n' => $i]);
|
||||
}
|
||||
$specs[] = ['queue' => $queue, 'maxCoroutines' => $spec['maxCoroutines']];
|
||||
}
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
|
||||
namespace Tests\Unit\Event;
|
||||
|
||||
use Utopia\Queue\Publisher;
|
||||
use Utopia\Queue\Publisher\Synchronous as Publisher;
|
||||
use Utopia\Queue\Queue;
|
||||
|
||||
class MockPublisher implements Publisher
|
||||
{
|
||||
private array $events = [];
|
||||
|
||||
public function enqueue(Queue $queue, array $payload, bool $priority = false): bool
|
||||
public function publish(Queue $queue, array $payload, bool $priority = false): bool
|
||||
{
|
||||
if (!isset($this->events[$queue->name])) {
|
||||
$this->events[$queue->name] = [];
|
||||
@@ -21,7 +21,7 @@ class MockPublisher implements Publisher
|
||||
public function enqueueMany(Queue $queue, array $payloads, bool $priority = false): bool
|
||||
{
|
||||
foreach ($payloads as $payload) {
|
||||
$this->enqueue($queue, $payload, $priority);
|
||||
$this->publish($queue, $payload, $priority);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -16,7 +16,7 @@ use Utopia\Database\Validator\Authorization;
|
||||
use Utopia\Migration\Destination;
|
||||
use Utopia\Migration\Resource;
|
||||
use Utopia\Migration\Source;
|
||||
use Utopia\Queue\Publisher;
|
||||
use Utopia\Queue\Publisher\Synchronous as Publisher;
|
||||
use Utopia\Queue\Queue;
|
||||
|
||||
final class MigrationsTest extends TestCase
|
||||
|
||||
Reference in new issue
Block a user