@usequark/quark-create-app 1.25.10 → 1.25.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -18,12 +18,7 @@
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
20
|
import { createLogger } from "@usequark/quark-core/core";
|
|
21
|
-
import {
|
|
22
|
-
checkQueues,
|
|
23
|
-
checkStorage,
|
|
24
|
-
runHealthChecks,
|
|
25
|
-
} from "@usequark/quark-core/health";
|
|
26
|
-
import { getRegisteredQueues } from "@usequark/quark-core/queue";
|
|
21
|
+
import { checkStorage, runHealthChecks } from "@usequark/quark-core/health";
|
|
27
22
|
import { pingRedis } from "@usequark/quark-core/redis";
|
|
28
23
|
import { pingDatabase } from "@usequark/quark-db";
|
|
29
24
|
import { NextResponse } from "next/server";
|
|
@@ -35,12 +30,21 @@ export async function GET() {
|
|
|
35
30
|
// `pingDatabase` is passed in rather than imported by the core module:
|
|
36
31
|
// `@usequark/quark-db` depends on `@usequark/quark-core`, so core cannot
|
|
37
32
|
// import it back without a cycle.
|
|
33
|
+
//
|
|
34
|
+
// There is deliberately no `queues` probe. `getRegisteredQueues()` reads a
|
|
35
|
+
// Map that only queues created *in this process* are registered in, and
|
|
36
|
+
// the web service creates none: the worker owns every long-lived queue.
|
|
37
|
+
// So the probe reported `null` on every request here — while its
|
|
38
|
+
// `getRegisteredQueues` import pulled all of BullMQ into this route.
|
|
39
|
+
// This endpoint is polled by the platform healthcheck and by
|
|
40
|
+
// `<HealthIndicator />` on every page view, making it the worst possible
|
|
41
|
+
// place to load a queue library for a result that is always empty.
|
|
42
|
+
// Queue depth is the worker's to publish, via `job_queue_depth`.
|
|
38
43
|
const result = await runHealthChecks({
|
|
39
44
|
probes: {
|
|
40
45
|
database: pingDatabase,
|
|
41
46
|
redis: pingRedis,
|
|
42
47
|
storage: checkStorage,
|
|
43
|
-
queues: () => checkQueues(getRegisteredQueues),
|
|
44
48
|
},
|
|
45
49
|
});
|
|
46
50
|
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
createWorker,
|
|
13
13
|
updateQueueDepths,
|
|
14
14
|
} from "@usequark/quark-core/queue";
|
|
15
|
-
import { getRedisEndpoint
|
|
15
|
+
import { getRedisEndpoint } from "@usequark/quark-core/redis";
|
|
16
16
|
import { job, prisma } from "@usequark/quark-db";
|
|
17
17
|
import { JOB_NAMES, JOB_QUEUES } from "@usequark/quark-jobs";
|
|
18
18
|
import { jobHandlers } from "./handlers/index.js";
|