Refresh HiveGrid Cloud reference snapshot
This commit is contained in:
1 parent
5e99e14772
commit
7f88026f79
5955 files changed
+1177325
-188362
No files matched your search
@@ -1,4 +1,10 @@
|
||||
import { queueNames, type QueueName } from "./names.js";
|
||||
import {
|
||||
productAcquisitionProviderOutboxQueueName,
|
||||
recurringInvoiceCollectionOutboxQueueName,
|
||||
queueNames,
|
||||
type OperationalQueueName,
|
||||
type QueueName,
|
||||
} from "./names.js";
|
||||
|
||||
/**
|
||||
* Worker queue groups — single source of truth for which BullMQ queues a
|
||||
@@ -12,10 +18,10 @@ import { queueNames, type QueueName } from "./names.js";
|
||||
* cleanup, outbox dispatcher cron). Concurrency ~10.
|
||||
* - `mail` — outbound mail and webhook delivery (SMTP/HTTP throughput-
|
||||
* bound). Concurrency ~5; replicate horizontally for volume.
|
||||
* - `import` — long-running CPU/memory-bound imports/exports. Concurrency
|
||||
* 1 — head-of-line-blocking is acceptable inside this group
|
||||
* because all jobs are heavy; we isolate them so they don't
|
||||
* stall the rest of the system.
|
||||
* - `import` — provider sync plus long-running CPU/memory-bound
|
||||
* imports/exports. KWP uses a dedicated queue so its
|
||||
* read-only synchronization can run while generic imports
|
||||
* remain gated off.
|
||||
* - `webhook` — external API integrations (browser automation) that are
|
||||
* I/O-bound and benefit from high parallelism.
|
||||
* - `plugin` — third-party WebAssembly plugin invocations (Phase 06
|
||||
@@ -30,7 +36,7 @@ import { queueNames, type QueueName } from "./names.js";
|
||||
export const WORKER_QUEUE_GROUPS = {
|
||||
general: [queueNames.notifications, queueNames.maintenance, queueNames.fileScan, queueNames.filePreview],
|
||||
mail: [queueNames.email],
|
||||
import: [queueNames.imports, queueNames.exports],
|
||||
import: [queueNames.kwpImports, queueNames.imports, queueNames.exports],
|
||||
webhook: [queueNames.browserAutomation],
|
||||
plugin: [queueNames.pluginInvoke],
|
||||
} as const satisfies Record<string, readonly QueueName[]>;
|
||||
@@ -66,6 +72,18 @@ export function getGroupForQueue(queue: QueueName): WorkerQueueGroup {
|
||||
return QUEUE_TO_GROUP[queue];
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse lookup for operator-visible queues. Dedicated outbox consumers are
|
||||
* operationally owned by the general worker group without being added to the
|
||||
* generic group subscription list.
|
||||
*/
|
||||
export function getOperationalGroupForQueue(queue: OperationalQueueName): WorkerQueueGroup {
|
||||
if (queue === productAcquisitionProviderOutboxQueueName || queue === recurringInvoiceCollectionOutboxQueueName) {
|
||||
return "general";
|
||||
}
|
||||
return getGroupForQueue(queue);
|
||||
}
|
||||
|
||||
/**
|
||||
* Type guard — does this string identify a known worker queue group?
|
||||
* Used by the runtime entry point to validate `WORKER_QUEUE_GROUP` env.
|
||||
|
||||
Reference in new issue
Block a user