@holo-js/queue 0.2.6 → 0.3.1
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/dist/chunk-5MPOVBVE.mjs +274 -0
- package/dist/config-Bleufve4.d.ts +394 -0
- package/dist/config.d.ts +1 -0
- package/dist/config.mjs +32 -0
- package/dist/index.d.ts +7 -434
- package/dist/index.mjs +102 -399
- package/package.json +9 -9
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
// src/config.ts
|
|
2
|
+
import { registerConfigNormalizer } from "@holo-js/config/registry";
|
|
3
|
+
var DEFAULT_QUEUE_CONNECTION = "sync";
|
|
4
|
+
var DEFAULT_QUEUE_NAME = "default";
|
|
5
|
+
var DEFAULT_QUEUE_RETRY_AFTER = 90;
|
|
6
|
+
var DEFAULT_QUEUE_BLOCK_FOR = 5;
|
|
7
|
+
var DEFAULT_QUEUE_SLEEP = 1;
|
|
8
|
+
var DEFAULT_FAILED_JOBS_CONNECTION = "default";
|
|
9
|
+
var DEFAULT_FAILED_JOBS_TABLE = "failed_jobs";
|
|
10
|
+
var DEFAULT_DATABASE_QUEUE_TABLE = "jobs";
|
|
11
|
+
var DEFAULT_REDIS_HOST = "127.0.0.1";
|
|
12
|
+
var DEFAULT_REDIS_PORT = 6379;
|
|
13
|
+
var DEFAULT_REDIS_DB = 0;
|
|
14
|
+
var DEFAULT_QUEUE_CONFIG = Object.freeze({
|
|
15
|
+
default: DEFAULT_QUEUE_CONNECTION,
|
|
16
|
+
failed: Object.freeze({
|
|
17
|
+
driver: "database",
|
|
18
|
+
connection: DEFAULT_FAILED_JOBS_CONNECTION,
|
|
19
|
+
table: DEFAULT_FAILED_JOBS_TABLE
|
|
20
|
+
}),
|
|
21
|
+
connections: Object.freeze({
|
|
22
|
+
[DEFAULT_QUEUE_CONNECTION]: Object.freeze({
|
|
23
|
+
name: DEFAULT_QUEUE_CONNECTION,
|
|
24
|
+
driver: "sync",
|
|
25
|
+
queue: DEFAULT_QUEUE_NAME
|
|
26
|
+
})
|
|
27
|
+
})
|
|
28
|
+
});
|
|
29
|
+
function parseInteger(value, fallback, label, options = {}) {
|
|
30
|
+
if (typeof value === "undefined") {
|
|
31
|
+
return fallback;
|
|
32
|
+
}
|
|
33
|
+
const normalized = typeof value === "number" ? value : value.trim();
|
|
34
|
+
if (typeof normalized === "string" && !/^[+-]?\d+$/.test(normalized)) {
|
|
35
|
+
throw new Error(`[Holo Queue] ${label} must be an integer.`);
|
|
36
|
+
}
|
|
37
|
+
const integer = typeof normalized === "number" ? normalized : Number(normalized);
|
|
38
|
+
if (!Number.isInteger(integer)) {
|
|
39
|
+
throw new Error(`[Holo Queue] ${label} must be an integer.`);
|
|
40
|
+
}
|
|
41
|
+
if (typeof options.minimum === "number" && integer < options.minimum) {
|
|
42
|
+
throw new Error(`[Holo Queue] ${label} must be greater than or equal to ${options.minimum}.`);
|
|
43
|
+
}
|
|
44
|
+
return integer;
|
|
45
|
+
}
|
|
46
|
+
function normalizeConnectionName(value, label) {
|
|
47
|
+
const normalized = value?.trim();
|
|
48
|
+
if (!normalized) {
|
|
49
|
+
throw new Error(`[Holo Queue] ${label} must be a non-empty string.`);
|
|
50
|
+
}
|
|
51
|
+
return normalized;
|
|
52
|
+
}
|
|
53
|
+
function normalizeQueueName(value) {
|
|
54
|
+
return value?.trim() || DEFAULT_QUEUE_NAME;
|
|
55
|
+
}
|
|
56
|
+
function normalizeOptionalRedisString(value) {
|
|
57
|
+
return value?.trim() || void 0;
|
|
58
|
+
}
|
|
59
|
+
function normalizeSyncConnection(name, config) {
|
|
60
|
+
return Object.freeze({
|
|
61
|
+
name,
|
|
62
|
+
driver: "sync",
|
|
63
|
+
queue: normalizeQueueName(config.queue)
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
function resolveSharedRedisConnection(redisConfig, connectionName) {
|
|
67
|
+
const resolvedConnection = redisConfig.connections[connectionName];
|
|
68
|
+
if (!resolvedConnection) {
|
|
69
|
+
const availableConnections = Object.keys(redisConfig.connections);
|
|
70
|
+
throw new Error(
|
|
71
|
+
`[Holo Queue] Queue Redis connection "${connectionName}" was not found in shared Redis config. Available connections: ${availableConnections.join(", ") || "(none)"}.`
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
return resolvedConnection;
|
|
75
|
+
}
|
|
76
|
+
function parseRedisDatabaseFromUrl(url, label) {
|
|
77
|
+
if (typeof url === "undefined") {
|
|
78
|
+
return void 0;
|
|
79
|
+
}
|
|
80
|
+
let parsed;
|
|
81
|
+
try {
|
|
82
|
+
parsed = new URL(url);
|
|
83
|
+
} catch (error) {
|
|
84
|
+
throw new Error(`[Holo Queue] ${label} is invalid: ${String(error)}`);
|
|
85
|
+
}
|
|
86
|
+
if (parsed.protocol !== "redis:" && parsed.protocol !== "rediss:") {
|
|
87
|
+
throw new Error(`[Holo Queue] ${label} is invalid: unsupported protocol "${parsed.protocol}".`);
|
|
88
|
+
}
|
|
89
|
+
const pathname = parsed.pathname.replace(/^\/+/, "");
|
|
90
|
+
if (!pathname) {
|
|
91
|
+
return void 0;
|
|
92
|
+
}
|
|
93
|
+
const [databaseSegment] = pathname.split("/");
|
|
94
|
+
if (!databaseSegment || !/^\d+$/.test(databaseSegment) || pathname !== databaseSegment) {
|
|
95
|
+
throw new Error(`[Holo Queue] ${label} must include at most one integer database path segment.`);
|
|
96
|
+
}
|
|
97
|
+
return Number(databaseSegment);
|
|
98
|
+
}
|
|
99
|
+
function normalizeRedisClusterNodes(connectionName, nodes) {
|
|
100
|
+
if (!nodes || nodes.length === 0) {
|
|
101
|
+
return void 0;
|
|
102
|
+
}
|
|
103
|
+
return Object.freeze(nodes.map((node, index) => {
|
|
104
|
+
const label = `queue connection "${connectionName}" redis cluster node ${index + 1}`;
|
|
105
|
+
const url = normalizeOptionalRedisString(node.url);
|
|
106
|
+
if (typeof url !== "undefined") {
|
|
107
|
+
const database = parseRedisDatabaseFromUrl(url, `${label} url`);
|
|
108
|
+
if (typeof database !== "undefined") {
|
|
109
|
+
throw new Error(`[Holo Queue] ${label} url cannot include a database path in cluster mode.`);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return Object.freeze({
|
|
113
|
+
...typeof url === "undefined" ? {} : { url },
|
|
114
|
+
host: normalizeOptionalRedisString(node.host) ?? DEFAULT_REDIS_HOST,
|
|
115
|
+
port: parseInteger(node.port, DEFAULT_REDIS_PORT, `${label} port`, {
|
|
116
|
+
minimum: 1
|
|
117
|
+
})
|
|
118
|
+
});
|
|
119
|
+
}));
|
|
120
|
+
}
|
|
121
|
+
function normalizeRedisOptions(connectionName, base, overrides) {
|
|
122
|
+
const hasTargetOverride = typeof overrides?.url !== "undefined" || typeof overrides?.clusters !== "undefined" || typeof overrides?.host !== "undefined" || typeof overrides?.port !== "undefined";
|
|
123
|
+
const url = normalizeOptionalRedisString(overrides?.url) ?? (hasTargetOverride ? void 0 : base?.url);
|
|
124
|
+
const clusters = typeof overrides?.clusters === "undefined" ? hasTargetOverride ? void 0 : base?.clusters : normalizeRedisClusterNodes(connectionName, overrides.clusters);
|
|
125
|
+
const dbFromUrl = parseRedisDatabaseFromUrl(url, `queue connection "${connectionName}" redis url`);
|
|
126
|
+
const db = parseInteger(overrides?.db ?? base?.db ?? dbFromUrl, DEFAULT_REDIS_DB, `queue connection "${connectionName}" redis db`, {
|
|
127
|
+
minimum: 0
|
|
128
|
+
});
|
|
129
|
+
if (typeof clusters !== "undefined" && db !== 0) {
|
|
130
|
+
throw new Error(`[Holo Queue] queue connection "${connectionName}" cannot select redis.db=${db} in cluster mode; Redis Cluster only supports database 0.`);
|
|
131
|
+
}
|
|
132
|
+
return Object.freeze({
|
|
133
|
+
...typeof url === "undefined" ? {} : { url },
|
|
134
|
+
...typeof clusters === "undefined" ? {} : { clusters },
|
|
135
|
+
host: normalizeOptionalRedisString(overrides?.host) ?? base?.host ?? DEFAULT_REDIS_HOST,
|
|
136
|
+
port: parseInteger(overrides?.port ?? base?.port, DEFAULT_REDIS_PORT, `queue connection "${connectionName}" redis port`, {
|
|
137
|
+
minimum: 1
|
|
138
|
+
}),
|
|
139
|
+
password: normalizeOptionalRedisString(overrides?.password) ?? base?.password,
|
|
140
|
+
username: normalizeOptionalRedisString(overrides?.username) ?? base?.username,
|
|
141
|
+
db
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
function normalizeRedisConnection(name, config, redisConfig) {
|
|
145
|
+
const explicitConnectionName = config.connection?.trim();
|
|
146
|
+
const connectionName = explicitConnectionName || redisConfig?.default;
|
|
147
|
+
if (!connectionName && !config.redis) {
|
|
148
|
+
throw new Error(
|
|
149
|
+
`[Holo Queue] Queue Redis connection "${name}" requires a shared Redis config with a default connection or an explicit connection name.`
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
if (!redisConfig && !config.redis) {
|
|
153
|
+
throw new Error(
|
|
154
|
+
`[Holo Queue] Queue Redis connection "${name}" references shared Redis connection "${connectionName}" but no shared Redis config was provided.`
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
const resolvedRedisConnection = redisConfig && connectionName ? resolveSharedRedisConnection(redisConfig, connectionName) : void 0;
|
|
158
|
+
return Object.freeze({
|
|
159
|
+
name,
|
|
160
|
+
driver: "redis",
|
|
161
|
+
connection: resolvedRedisConnection?.name ?? connectionName ?? name,
|
|
162
|
+
queue: normalizeQueueName(config.queue),
|
|
163
|
+
retryAfter: parseInteger(config.retryAfter, DEFAULT_QUEUE_RETRY_AFTER, `queue connection "${name}" retryAfter`, {
|
|
164
|
+
minimum: 0
|
|
165
|
+
}),
|
|
166
|
+
blockFor: parseInteger(config.blockFor, DEFAULT_QUEUE_BLOCK_FOR, `queue connection "${name}" blockFor`, {
|
|
167
|
+
minimum: 0
|
|
168
|
+
}),
|
|
169
|
+
redis: normalizeRedisOptions(name, resolvedRedisConnection, config.redis)
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
function normalizeDatabaseConnection(name, config) {
|
|
173
|
+
return Object.freeze({
|
|
174
|
+
name,
|
|
175
|
+
driver: "database",
|
|
176
|
+
queue: normalizeQueueName(config.queue),
|
|
177
|
+
retryAfter: parseInteger(config.retryAfter, DEFAULT_QUEUE_RETRY_AFTER, `queue connection "${name}" retryAfter`, {
|
|
178
|
+
minimum: 0
|
|
179
|
+
}),
|
|
180
|
+
sleep: parseInteger(config.sleep, DEFAULT_QUEUE_SLEEP, `queue connection "${name}" sleep`, {
|
|
181
|
+
minimum: 0
|
|
182
|
+
}),
|
|
183
|
+
connection: config.connection?.trim() || DEFAULT_FAILED_JOBS_CONNECTION,
|
|
184
|
+
table: config.table?.trim() || DEFAULT_DATABASE_QUEUE_TABLE
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
function normalizePluginConnection(name, config) {
|
|
188
|
+
const { driver, queue, ...options } = config;
|
|
189
|
+
return Object.freeze({
|
|
190
|
+
...options,
|
|
191
|
+
name,
|
|
192
|
+
driver: normalizeConnectionName(driver, `queue connection "${name}" driver`),
|
|
193
|
+
queue: normalizeQueueName(queue)
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
function normalizeConnectionConfig(name, config, redisConfig) {
|
|
197
|
+
switch (config.driver) {
|
|
198
|
+
case "sync":
|
|
199
|
+
return normalizeSyncConnection(name, config);
|
|
200
|
+
case "redis":
|
|
201
|
+
return normalizeRedisConnection(name, config, redisConfig);
|
|
202
|
+
case "database":
|
|
203
|
+
return normalizeDatabaseConnection(name, config);
|
|
204
|
+
default:
|
|
205
|
+
return normalizePluginConnection(name, config);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
function normalizeConnections(connections, redisConfig) {
|
|
209
|
+
if (!connections || Object.keys(connections).length === 0) {
|
|
210
|
+
return DEFAULT_QUEUE_CONFIG.connections;
|
|
211
|
+
}
|
|
212
|
+
const normalizedEntries = Object.entries(connections).map(([name, config]) => {
|
|
213
|
+
const normalizedName = normalizeConnectionName(name, "Queue connection name");
|
|
214
|
+
return [normalizedName, normalizeConnectionConfig(normalizedName, config, redisConfig)];
|
|
215
|
+
});
|
|
216
|
+
return Object.freeze(Object.fromEntries(normalizedEntries));
|
|
217
|
+
}
|
|
218
|
+
function normalizeFailedStore(config) {
|
|
219
|
+
if (config === false) {
|
|
220
|
+
return false;
|
|
221
|
+
}
|
|
222
|
+
const normalized = config ?? DEFAULT_QUEUE_CONFIG.failed;
|
|
223
|
+
if (normalized.driver && normalized.driver !== "database") {
|
|
224
|
+
throw new Error(`[Holo Queue] Unsupported failed job store driver "${normalized.driver}".`);
|
|
225
|
+
}
|
|
226
|
+
return Object.freeze({
|
|
227
|
+
driver: "database",
|
|
228
|
+
connection: normalized.connection?.trim() || DEFAULT_FAILED_JOBS_CONNECTION,
|
|
229
|
+
table: normalized.table?.trim() || DEFAULT_FAILED_JOBS_TABLE
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
function normalizeQueueConfig(config = {}, redisConfig) {
|
|
233
|
+
const connections = normalizeConnections(config.connections, redisConfig);
|
|
234
|
+
const connectionNames = Object.keys(connections);
|
|
235
|
+
const defaultConnection = config.default?.trim() || connectionNames[0];
|
|
236
|
+
if (!connections[defaultConnection]) {
|
|
237
|
+
throw new Error(
|
|
238
|
+
`[Holo Queue] default queue connection "${defaultConnection}" is not configured. Available connections: ${connectionNames.join(", ")}`
|
|
239
|
+
);
|
|
240
|
+
}
|
|
241
|
+
return Object.freeze({
|
|
242
|
+
default: defaultConnection,
|
|
243
|
+
failed: normalizeFailedStore(config.failed),
|
|
244
|
+
connections
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
var holoQueueDefaults = DEFAULT_QUEUE_CONFIG;
|
|
248
|
+
var queueInternals = {
|
|
249
|
+
parseInteger
|
|
250
|
+
};
|
|
251
|
+
registerConfigNormalizer({
|
|
252
|
+
name: "queue",
|
|
253
|
+
dependencies: ["redis"],
|
|
254
|
+
normalize(config, context) {
|
|
255
|
+
return normalizeQueueConfig(config, context.has("redis") ? context.get("redis") : void 0);
|
|
256
|
+
}
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
export {
|
|
260
|
+
DEFAULT_QUEUE_CONNECTION,
|
|
261
|
+
DEFAULT_QUEUE_NAME,
|
|
262
|
+
DEFAULT_QUEUE_RETRY_AFTER,
|
|
263
|
+
DEFAULT_QUEUE_BLOCK_FOR,
|
|
264
|
+
DEFAULT_QUEUE_SLEEP,
|
|
265
|
+
DEFAULT_FAILED_JOBS_CONNECTION,
|
|
266
|
+
DEFAULT_FAILED_JOBS_TABLE,
|
|
267
|
+
DEFAULT_DATABASE_QUEUE_TABLE,
|
|
268
|
+
DEFAULT_REDIS_HOST,
|
|
269
|
+
DEFAULT_REDIS_PORT,
|
|
270
|
+
DEFAULT_REDIS_DB,
|
|
271
|
+
normalizeQueueConfig,
|
|
272
|
+
holoQueueDefaults,
|
|
273
|
+
queueInternals
|
|
274
|
+
};
|
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
type QueueJsonPrimitive = string | number | boolean | null;
|
|
2
|
+
type QueueJsonValue = QueueJsonPrimitive | readonly QueueJsonValue[] | {
|
|
3
|
+
readonly [key: string]: QueueJsonValue;
|
|
4
|
+
};
|
|
5
|
+
type QueueJobDispatcher = <TPayload extends QueueJsonValue>(jobName: string, payload: TPayload) => QueuePendingDispatch<TPayload>;
|
|
6
|
+
type QueueJobSyncDispatcher = <TPayload extends QueueJsonValue, TResult>(jobName: string, payload: TPayload) => Promise<TResult>;
|
|
7
|
+
declare function setQueueJobDispatcher(dispatcher: QueueJobDispatcher): void;
|
|
8
|
+
declare function setQueueJobSyncDispatcher(dispatcher: QueueJobSyncDispatcher): void;
|
|
9
|
+
declare function setQueueJobDefinitionName(definition: object, name: string): void;
|
|
10
|
+
declare function deleteQueueJobDefinitionName(name: string): void;
|
|
11
|
+
declare function clearQueueJobDefinitionNames(): void;
|
|
12
|
+
declare function resolveQueueJobDefinitionName(definition: object): string;
|
|
13
|
+
declare function dispatchDefinedQueueJob<TPayload extends QueueJsonValue>(definition: object, payload: TPayload): QueuePendingDispatch<TPayload>;
|
|
14
|
+
declare function dispatchDefinedQueueJobSync<TPayload extends QueueJsonValue, TResult>(definition: object, payload: TPayload): Promise<TResult>;
|
|
15
|
+
declare function normalizeOptionalString(value: string | undefined, label: string): string | undefined;
|
|
16
|
+
declare function normalizeOptionalInteger(value: number | undefined, label: string, options?: {
|
|
17
|
+
minimum?: number;
|
|
18
|
+
}): number | undefined;
|
|
19
|
+
declare function normalizeBackoff(value: number | readonly number[] | undefined): number | readonly number[] | undefined;
|
|
20
|
+
declare function normalizeOptionalHook<THandler extends (...args: never[]) => unknown>(value: THandler | undefined, label: string): THandler | undefined;
|
|
21
|
+
interface QueueJobContext {
|
|
22
|
+
readonly jobId: string;
|
|
23
|
+
readonly jobName: string;
|
|
24
|
+
readonly connection: string;
|
|
25
|
+
readonly queue: string;
|
|
26
|
+
readonly attempt: number;
|
|
27
|
+
readonly maxAttempts: number;
|
|
28
|
+
release(delaySeconds?: number): Promise<void>;
|
|
29
|
+
fail(error: Error): Promise<void>;
|
|
30
|
+
}
|
|
31
|
+
interface QueueJobCompletedHook<TPayload extends QueueJsonValue = QueueJsonValue, TResult = unknown> {
|
|
32
|
+
(payload: TPayload, result: TResult, context: QueueJobContext): void | Promise<void>;
|
|
33
|
+
}
|
|
34
|
+
interface QueueJobFailedHook<TPayload extends QueueJsonValue = QueueJsonValue> {
|
|
35
|
+
(payload: TPayload, error: Error, context: QueueJobContext): void | Promise<void>;
|
|
36
|
+
}
|
|
37
|
+
interface QueueJobDefinition<TPayload extends QueueJsonValue = QueueJsonValue, TResult = unknown> {
|
|
38
|
+
readonly connection?: string;
|
|
39
|
+
readonly queue?: string;
|
|
40
|
+
readonly tries?: number;
|
|
41
|
+
readonly backoff?: number | readonly number[];
|
|
42
|
+
readonly timeout?: number;
|
|
43
|
+
readonly onCompleted?: QueueJobCompletedHook<TPayload, TResult>;
|
|
44
|
+
readonly onFailed?: QueueJobFailedHook<TPayload>;
|
|
45
|
+
handle(payload: TPayload, context: QueueJobContext): Promise<TResult> | TResult;
|
|
46
|
+
}
|
|
47
|
+
interface DefinedQueueJobDefinition<TPayload extends QueueJsonValue = QueueJsonValue, TResult = unknown> extends QueueJobDefinition<TPayload, TResult> {
|
|
48
|
+
dispatch(payload: TPayload): QueuePendingDispatch<TPayload>;
|
|
49
|
+
dispatchSync(payload: TPayload): Promise<TResult>;
|
|
50
|
+
}
|
|
51
|
+
interface QueueJobEnvelope<TPayload extends QueueJsonValue = QueueJsonValue> {
|
|
52
|
+
readonly id: string;
|
|
53
|
+
readonly name: string;
|
|
54
|
+
readonly connection: string;
|
|
55
|
+
readonly queue: string;
|
|
56
|
+
readonly payload: TPayload;
|
|
57
|
+
readonly attempts: number;
|
|
58
|
+
readonly maxAttempts: number;
|
|
59
|
+
readonly availableAt?: number;
|
|
60
|
+
readonly createdAt: number;
|
|
61
|
+
}
|
|
62
|
+
type QueueDelayValue = number | Date;
|
|
63
|
+
interface QueueDispatchOptions {
|
|
64
|
+
readonly connection?: string;
|
|
65
|
+
readonly queue?: string;
|
|
66
|
+
readonly delay?: QueueDelayValue;
|
|
67
|
+
}
|
|
68
|
+
interface QueueDispatchResult {
|
|
69
|
+
readonly jobId: string;
|
|
70
|
+
readonly connection: string;
|
|
71
|
+
readonly queue: string;
|
|
72
|
+
readonly synchronous: boolean;
|
|
73
|
+
}
|
|
74
|
+
interface QueueDispatchCompletedHook {
|
|
75
|
+
(result: QueueDispatchResult): void | Promise<void>;
|
|
76
|
+
}
|
|
77
|
+
interface QueueDispatchFailedHook {
|
|
78
|
+
(error: unknown): void | Promise<void>;
|
|
79
|
+
}
|
|
80
|
+
interface QueueDriverDispatchResult<TResult = unknown> {
|
|
81
|
+
readonly jobId: string;
|
|
82
|
+
readonly synchronous: boolean;
|
|
83
|
+
readonly result?: TResult;
|
|
84
|
+
}
|
|
85
|
+
interface QueueRegisteredJob<TPayload extends QueueJsonValue = QueueJsonValue, TResult = unknown> {
|
|
86
|
+
readonly name: string;
|
|
87
|
+
readonly sourcePath?: string;
|
|
88
|
+
readonly definition: QueueJobDefinition<TPayload, TResult>;
|
|
89
|
+
}
|
|
90
|
+
interface HoloQueueJobRegistry {
|
|
91
|
+
}
|
|
92
|
+
type KnownQueueJobName = Extract<keyof HoloQueueJobRegistry, string>;
|
|
93
|
+
type DynamicQueueJobName<TJobName extends string> = [KnownQueueJobName] extends [never] ? TJobName : TJobName extends KnownQueueJobName ? never : KnownQueueJobName extends TJobName ? never : TJobName;
|
|
94
|
+
type ResolveRegisteredQueueJobDefinition<TJobName extends string> = TJobName extends KnownQueueJobName ? HoloQueueJobRegistry[TJobName] extends QueueJobDefinition<infer TPayload, infer TResult> ? QueueJobDefinition<TPayload, TResult> : QueueJobDefinition : QueueJobDefinition;
|
|
95
|
+
type ExportedQueueJobDefinition<TValue> = TValue extends QueueJobDefinition<infer TPayload, infer TResult> ? QueueJobDefinition<TPayload, TResult> : QueueJobDefinition;
|
|
96
|
+
type QueuePayloadFor<TJobName extends string> = ResolveRegisteredQueueJobDefinition<TJobName> extends QueueJobDefinition<infer TPayload, infer _TResult> ? TPayload : QueueJsonValue;
|
|
97
|
+
type QueueResultFor<TJobName extends string> = ResolveRegisteredQueueJobDefinition<TJobName> extends QueueJobDefinition<infer _TPayload, infer TResult> ? TResult : unknown;
|
|
98
|
+
interface RegisterQueueJobOptions {
|
|
99
|
+
readonly name?: string;
|
|
100
|
+
readonly sourcePath?: string;
|
|
101
|
+
readonly replaceExisting?: boolean;
|
|
102
|
+
}
|
|
103
|
+
type RegisterableQueueJobDefinition<TPayload extends QueueJsonValue = QueueJsonValue, TResult = unknown> = QueueJobDefinition<TPayload, TResult>;
|
|
104
|
+
interface QueuePendingDispatch<TPayload extends QueueJsonValue = QueueJsonValue> extends PromiseLike<QueueDispatchResult> {
|
|
105
|
+
onConnection(name: string): QueuePendingDispatch<TPayload>;
|
|
106
|
+
onQueue(name: string): QueuePendingDispatch<TPayload>;
|
|
107
|
+
delay(value: QueueDelayValue): QueuePendingDispatch<TPayload>;
|
|
108
|
+
onComplete(callback: QueueDispatchCompletedHook): QueuePendingDispatch<TPayload>;
|
|
109
|
+
onFailed(callback: QueueDispatchFailedHook): QueuePendingDispatch<TPayload>;
|
|
110
|
+
then<TResult1 = QueueDispatchResult, TResult2 = never>(onfulfilled?: ((value: QueueDispatchResult) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: unknown) => TResult2 | PromiseLike<TResult2>) | null): Promise<TResult1 | TResult2>;
|
|
111
|
+
catch<TResult = never>(onrejected?: ((reason: unknown) => TResult | PromiseLike<TResult>) | null): Promise<QueueDispatchResult | TResult>;
|
|
112
|
+
finally(onfinally?: (() => void) | null): Promise<QueueDispatchResult>;
|
|
113
|
+
dispatch(): Promise<QueueDispatchResult>;
|
|
114
|
+
}
|
|
115
|
+
interface QueueConnectionFacade {
|
|
116
|
+
readonly name: string;
|
|
117
|
+
dispatch<TJobName extends KnownQueueJobName>(jobName: TJobName, payload: QueuePayloadFor<TJobName>, options?: QueueDispatchOptions): QueuePendingDispatch<QueuePayloadFor<TJobName>>;
|
|
118
|
+
dispatch<TPayload extends QueueJsonValue = QueueJsonValue, const TJobName extends string = string>(jobName: TJobName & DynamicQueueJobName<TJobName>, payload: TPayload, options?: QueueDispatchOptions): QueuePendingDispatch<TPayload>;
|
|
119
|
+
dispatchSync<TJobName extends KnownQueueJobName>(jobName: TJobName, payload: QueuePayloadFor<TJobName>): Promise<QueueResultFor<TJobName>>;
|
|
120
|
+
dispatchSync<TPayload extends QueueJsonValue = QueueJsonValue, TResult = unknown, const TJobName extends string = string>(jobName: TJobName & DynamicQueueJobName<TJobName>, payload: TPayload): Promise<TResult>;
|
|
121
|
+
}
|
|
122
|
+
interface QueueEnqueueResult {
|
|
123
|
+
readonly jobId: string;
|
|
124
|
+
}
|
|
125
|
+
interface QueueReserveInput {
|
|
126
|
+
readonly queueNames?: readonly string[];
|
|
127
|
+
readonly workerId?: string;
|
|
128
|
+
readonly timeout?: number;
|
|
129
|
+
}
|
|
130
|
+
interface QueueReservedJob<TPayload extends QueueJsonValue = QueueJsonValue> {
|
|
131
|
+
readonly reservationId: string;
|
|
132
|
+
readonly envelope: QueueJobEnvelope<TPayload>;
|
|
133
|
+
readonly reservedAt: number;
|
|
134
|
+
}
|
|
135
|
+
interface QueueReleaseOptions {
|
|
136
|
+
readonly delaySeconds?: number;
|
|
137
|
+
}
|
|
138
|
+
interface QueueClearInput {
|
|
139
|
+
readonly queueNames?: readonly string[];
|
|
140
|
+
}
|
|
141
|
+
interface QueueJobContextOverrides {
|
|
142
|
+
readonly maxAttempts?: number;
|
|
143
|
+
shouldSkipLifecycleHooks?(): boolean;
|
|
144
|
+
release?(delaySeconds?: number): Promise<void>;
|
|
145
|
+
fail?(error: Error): Promise<void>;
|
|
146
|
+
}
|
|
147
|
+
interface QueueDriverFactoryContext {
|
|
148
|
+
execute<TPayload extends QueueJsonValue = QueueJsonValue, TResult = unknown>(job: QueueJobEnvelope<TPayload>): Promise<TResult>;
|
|
149
|
+
}
|
|
150
|
+
interface QueueDriverBase {
|
|
151
|
+
readonly name: string;
|
|
152
|
+
readonly driver: NormalizedQueueConnectionConfig['driver'];
|
|
153
|
+
readonly mode: 'sync' | 'async';
|
|
154
|
+
dispatch<TPayload extends QueueJsonValue = QueueJsonValue, TResult = unknown>(job: QueueJobEnvelope<TPayload>): Promise<QueueDriverDispatchResult<TResult>>;
|
|
155
|
+
clear(input?: QueueClearInput): Promise<number>;
|
|
156
|
+
close(): Promise<void>;
|
|
157
|
+
}
|
|
158
|
+
interface QueueAsyncDriver extends QueueDriverBase {
|
|
159
|
+
readonly mode: 'async';
|
|
160
|
+
reserve<TPayload extends QueueJsonValue = QueueJsonValue>(input: QueueReserveInput): Promise<QueueReservedJob<TPayload> | null>;
|
|
161
|
+
acknowledge(job: QueueReservedJob): Promise<void>;
|
|
162
|
+
release(job: QueueReservedJob, options?: QueueReleaseOptions): Promise<void>;
|
|
163
|
+
delete(job: QueueReservedJob): Promise<void>;
|
|
164
|
+
}
|
|
165
|
+
interface QueueSyncDriver extends QueueDriverBase {
|
|
166
|
+
readonly mode: 'sync';
|
|
167
|
+
}
|
|
168
|
+
type QueueDriver = QueueSyncDriver | QueueAsyncDriver;
|
|
169
|
+
interface QueueDriverFactory<TConfig extends NormalizedQueueConnectionConfig = NormalizedQueueConnectionConfig> {
|
|
170
|
+
readonly driver: TConfig['driver'];
|
|
171
|
+
create(connection: TConfig, context: QueueDriverFactoryContext): QueueDriver;
|
|
172
|
+
}
|
|
173
|
+
interface QueueRuntimeBinding {
|
|
174
|
+
readonly config: NormalizedHoloQueueConfig;
|
|
175
|
+
readonly drivers: ReadonlyMap<string, QueueDriver>;
|
|
176
|
+
}
|
|
177
|
+
interface QueueWorkerOptions {
|
|
178
|
+
readonly connection?: string;
|
|
179
|
+
readonly queueNames?: readonly string[];
|
|
180
|
+
readonly once?: boolean;
|
|
181
|
+
readonly stopWhenEmpty?: boolean;
|
|
182
|
+
readonly sleep?: number;
|
|
183
|
+
readonly tries?: number;
|
|
184
|
+
readonly timeout?: number;
|
|
185
|
+
readonly maxJobs?: number;
|
|
186
|
+
readonly maxTime?: number;
|
|
187
|
+
readonly workerId?: string;
|
|
188
|
+
readonly shouldStop?: () => boolean | Promise<boolean>;
|
|
189
|
+
readonly sleepFn?: (milliseconds: number) => Promise<void>;
|
|
190
|
+
}
|
|
191
|
+
interface QueueWorkerJobEvent {
|
|
192
|
+
readonly jobId: string;
|
|
193
|
+
readonly jobName: string;
|
|
194
|
+
readonly connection: string;
|
|
195
|
+
readonly queue: string;
|
|
196
|
+
readonly attempt: number;
|
|
197
|
+
readonly maxAttempts: number;
|
|
198
|
+
}
|
|
199
|
+
interface QueueWorkerHooks {
|
|
200
|
+
onJobProcessed?(event: QueueWorkerJobEvent): void | Promise<void>;
|
|
201
|
+
onJobReleased?(event: QueueWorkerJobEvent & {
|
|
202
|
+
readonly delaySeconds?: number;
|
|
203
|
+
readonly error?: Error;
|
|
204
|
+
}): void | Promise<void>;
|
|
205
|
+
onJobFailed?(event: QueueWorkerJobEvent & {
|
|
206
|
+
readonly error: Error;
|
|
207
|
+
}): void | Promise<void>;
|
|
208
|
+
onIdle?(): void | Promise<void>;
|
|
209
|
+
}
|
|
210
|
+
interface QueueWorkerRunOptions extends QueueWorkerOptions, QueueWorkerHooks {
|
|
211
|
+
}
|
|
212
|
+
interface QueueWorkerResult {
|
|
213
|
+
readonly processed: number;
|
|
214
|
+
readonly released: number;
|
|
215
|
+
readonly failed: number;
|
|
216
|
+
readonly stoppedBecause: 'once' | 'empty' | 'max-jobs' | 'max-time' | 'signal';
|
|
217
|
+
}
|
|
218
|
+
interface QueueFailedJobRecord<TPayload extends QueueJsonValue = QueueJsonValue> {
|
|
219
|
+
readonly id: string;
|
|
220
|
+
readonly jobId: string;
|
|
221
|
+
readonly job: QueueJobEnvelope<TPayload>;
|
|
222
|
+
readonly exception: string;
|
|
223
|
+
readonly failedAt: number;
|
|
224
|
+
}
|
|
225
|
+
interface QueueFailedJobStore {
|
|
226
|
+
persistFailedJob(reserved: QueueReservedJob, error: Error): Promise<QueueFailedJobRecord | null>;
|
|
227
|
+
listFailedJobs(): Promise<readonly QueueFailedJobRecord[]>;
|
|
228
|
+
retryFailedJobs(identifier: 'all' | string, retry: (record: QueueFailedJobRecord) => Promise<void>): Promise<number>;
|
|
229
|
+
forgetFailedJob(id: string): Promise<boolean>;
|
|
230
|
+
flushFailedJobs(): Promise<number>;
|
|
231
|
+
}
|
|
232
|
+
declare function isQueueJobDefinition(value: unknown): value is QueueJobDefinition;
|
|
233
|
+
declare function normalizeQueueJobDefinition<TPayload extends QueueJsonValue, TResult, TJob extends QueueJobDefinition<TPayload, TResult>>(job: TJob): TJob;
|
|
234
|
+
declare function defineJob<TPayload extends QueueJsonValue, TResult = unknown>(job: QueueJobDefinition<TPayload, TResult>): DefinedQueueJobDefinition<TPayload, TResult>;
|
|
235
|
+
interface QueueFailedStoreConfig {
|
|
236
|
+
readonly driver?: 'database';
|
|
237
|
+
readonly connection?: string;
|
|
238
|
+
readonly table?: string;
|
|
239
|
+
}
|
|
240
|
+
interface QueueRedisConnectionConfig {
|
|
241
|
+
readonly driver: 'redis';
|
|
242
|
+
readonly connection?: string;
|
|
243
|
+
readonly queue?: string;
|
|
244
|
+
readonly retryAfter?: number | string;
|
|
245
|
+
readonly blockFor?: number | string;
|
|
246
|
+
readonly redis?: {
|
|
247
|
+
readonly url?: string;
|
|
248
|
+
readonly clusters?: readonly {
|
|
249
|
+
readonly url?: string;
|
|
250
|
+
readonly host?: string;
|
|
251
|
+
readonly port?: number | string;
|
|
252
|
+
}[];
|
|
253
|
+
readonly host?: string;
|
|
254
|
+
readonly port?: number | string;
|
|
255
|
+
readonly password?: string;
|
|
256
|
+
readonly username?: string;
|
|
257
|
+
readonly db?: number | string;
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
interface QueueDatabaseConnectionConfig {
|
|
261
|
+
readonly driver: 'database';
|
|
262
|
+
readonly queue?: string;
|
|
263
|
+
readonly retryAfter?: number | string;
|
|
264
|
+
readonly sleep?: number | string;
|
|
265
|
+
readonly connection?: string;
|
|
266
|
+
readonly table?: string;
|
|
267
|
+
}
|
|
268
|
+
interface QueueSyncConnectionConfig {
|
|
269
|
+
readonly driver: 'sync';
|
|
270
|
+
readonly queue?: string;
|
|
271
|
+
}
|
|
272
|
+
interface QueuePluginConnectionConfig {
|
|
273
|
+
readonly driver: string;
|
|
274
|
+
readonly queue?: string;
|
|
275
|
+
readonly [key: string]: unknown;
|
|
276
|
+
}
|
|
277
|
+
type QueueConnectionConfig = QueueSyncConnectionConfig | QueueRedisConnectionConfig | QueueDatabaseConnectionConfig | QueuePluginConnectionConfig;
|
|
278
|
+
interface HoloQueueConfig {
|
|
279
|
+
readonly default?: string;
|
|
280
|
+
readonly failed?: false | QueueFailedStoreConfig;
|
|
281
|
+
readonly connections?: Readonly<Record<string, QueueConnectionConfig>>;
|
|
282
|
+
}
|
|
283
|
+
interface NormalizedQueueFailedStoreConfig {
|
|
284
|
+
readonly driver: 'database';
|
|
285
|
+
readonly connection: string;
|
|
286
|
+
readonly table: string;
|
|
287
|
+
}
|
|
288
|
+
interface NormalizedQueueSyncConnectionConfig {
|
|
289
|
+
readonly name: string;
|
|
290
|
+
readonly driver: 'sync';
|
|
291
|
+
readonly queue: string;
|
|
292
|
+
}
|
|
293
|
+
interface NormalizedQueueRedisConnectionConfig {
|
|
294
|
+
readonly name: string;
|
|
295
|
+
readonly driver: 'redis';
|
|
296
|
+
readonly connection: string;
|
|
297
|
+
readonly queue: string;
|
|
298
|
+
readonly retryAfter: number;
|
|
299
|
+
readonly blockFor: number;
|
|
300
|
+
readonly redis: {
|
|
301
|
+
readonly url?: string;
|
|
302
|
+
readonly clusters?: readonly {
|
|
303
|
+
readonly url?: string;
|
|
304
|
+
readonly host: string;
|
|
305
|
+
readonly port: number;
|
|
306
|
+
}[];
|
|
307
|
+
readonly host: string;
|
|
308
|
+
readonly port: number;
|
|
309
|
+
readonly password?: string;
|
|
310
|
+
readonly username?: string;
|
|
311
|
+
readonly db: number;
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
interface QueueSharedRedisConnectionConfig {
|
|
315
|
+
readonly name: string;
|
|
316
|
+
readonly url?: string;
|
|
317
|
+
readonly clusters?: readonly {
|
|
318
|
+
readonly url?: string;
|
|
319
|
+
readonly host: string;
|
|
320
|
+
readonly port: number;
|
|
321
|
+
}[];
|
|
322
|
+
readonly host: string;
|
|
323
|
+
readonly port: number;
|
|
324
|
+
readonly password?: string;
|
|
325
|
+
readonly username?: string;
|
|
326
|
+
readonly db: number;
|
|
327
|
+
}
|
|
328
|
+
interface QueueSharedRedisConfig {
|
|
329
|
+
readonly default: string;
|
|
330
|
+
readonly connections: Readonly<Record<string, QueueSharedRedisConnectionConfig>>;
|
|
331
|
+
}
|
|
332
|
+
interface NormalizedQueueDatabaseConnectionConfig {
|
|
333
|
+
readonly name: string;
|
|
334
|
+
readonly driver: 'database';
|
|
335
|
+
readonly queue: string;
|
|
336
|
+
readonly retryAfter: number;
|
|
337
|
+
readonly sleep: number;
|
|
338
|
+
readonly connection: string;
|
|
339
|
+
readonly table: string;
|
|
340
|
+
}
|
|
341
|
+
interface NormalizedQueuePluginConnectionConfig {
|
|
342
|
+
readonly name: string;
|
|
343
|
+
readonly driver: string;
|
|
344
|
+
readonly queue: string;
|
|
345
|
+
readonly [key: string]: unknown;
|
|
346
|
+
}
|
|
347
|
+
type NormalizedQueueConnectionConfig = NormalizedQueueSyncConnectionConfig | NormalizedQueueRedisConnectionConfig | NormalizedQueueDatabaseConnectionConfig | NormalizedQueuePluginConnectionConfig;
|
|
348
|
+
interface NormalizedHoloQueueConfig {
|
|
349
|
+
readonly default: string;
|
|
350
|
+
readonly failed: false | NormalizedQueueFailedStoreConfig;
|
|
351
|
+
readonly connections: Readonly<Record<string, NormalizedQueueConnectionConfig>>;
|
|
352
|
+
}
|
|
353
|
+
declare const queueJobInternals: {
|
|
354
|
+
clearQueueJobDefinitionNames: typeof clearQueueJobDefinitionNames;
|
|
355
|
+
deleteQueueJobDefinitionName: typeof deleteQueueJobDefinitionName;
|
|
356
|
+
dispatchDefinedQueueJob: typeof dispatchDefinedQueueJob;
|
|
357
|
+
dispatchDefinedQueueJobSync: typeof dispatchDefinedQueueJobSync;
|
|
358
|
+
normalizeQueueJobDefinition: typeof normalizeQueueJobDefinition;
|
|
359
|
+
normalizeBackoff: typeof normalizeBackoff;
|
|
360
|
+
normalizeOptionalHook: typeof normalizeOptionalHook;
|
|
361
|
+
normalizeOptionalInteger: typeof normalizeOptionalInteger;
|
|
362
|
+
normalizeOptionalString: typeof normalizeOptionalString;
|
|
363
|
+
resolveQueueJobDefinitionName: typeof resolveQueueJobDefinitionName;
|
|
364
|
+
setQueueJobDefinitionName: typeof setQueueJobDefinitionName;
|
|
365
|
+
setQueueJobDispatcher: typeof setQueueJobDispatcher;
|
|
366
|
+
setQueueJobSyncDispatcher: typeof setQueueJobSyncDispatcher;
|
|
367
|
+
};
|
|
368
|
+
|
|
369
|
+
declare const DEFAULT_QUEUE_CONNECTION = "sync";
|
|
370
|
+
declare const DEFAULT_QUEUE_NAME = "default";
|
|
371
|
+
declare const DEFAULT_QUEUE_RETRY_AFTER = 90;
|
|
372
|
+
declare const DEFAULT_QUEUE_BLOCK_FOR = 5;
|
|
373
|
+
declare const DEFAULT_QUEUE_SLEEP = 1;
|
|
374
|
+
declare const DEFAULT_FAILED_JOBS_CONNECTION = "default";
|
|
375
|
+
declare const DEFAULT_FAILED_JOBS_TABLE = "failed_jobs";
|
|
376
|
+
declare const DEFAULT_DATABASE_QUEUE_TABLE = "jobs";
|
|
377
|
+
declare const DEFAULT_REDIS_HOST = "127.0.0.1";
|
|
378
|
+
declare const DEFAULT_REDIS_PORT = 6379;
|
|
379
|
+
declare const DEFAULT_REDIS_DB = 0;
|
|
380
|
+
declare function parseInteger(value: number | string | undefined, fallback: number, label: string, options?: {
|
|
381
|
+
minimum?: number;
|
|
382
|
+
}): number;
|
|
383
|
+
declare function normalizeQueueConfig(config?: HoloQueueConfig, redisConfig?: QueueSharedRedisConfig): NormalizedHoloQueueConfig;
|
|
384
|
+
declare const holoQueueDefaults: Readonly<NormalizedHoloQueueConfig>;
|
|
385
|
+
declare const queueInternals: {
|
|
386
|
+
parseInteger: typeof parseInteger;
|
|
387
|
+
};
|
|
388
|
+
declare module '@holo-js/config' {
|
|
389
|
+
interface HoloConfigRegistry {
|
|
390
|
+
queue: NormalizedHoloQueueConfig;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
export { type QueueDispatchFailedHook as $, type QueueWorkerJobEvent as A, type QueueAsyncDriver as B, type QueueWorkerRunOptions as C, type QueueJobDefinition as D, type QueueWorkerOptions as E, type QueueWorkerResult as F, DEFAULT_DATABASE_QUEUE_TABLE as G, type HoloQueueJobRegistry as H, DEFAULT_FAILED_JOBS_CONNECTION as I, DEFAULT_FAILED_JOBS_TABLE as J, DEFAULT_QUEUE_BLOCK_FOR as K, DEFAULT_QUEUE_CONNECTION as L, DEFAULT_QUEUE_NAME as M, type NormalizedQueueSyncConnectionConfig as N, DEFAULT_QUEUE_RETRY_AFTER as O, DEFAULT_QUEUE_SLEEP as P, type QueueRegisteredJob as Q, type RegisterableQueueJobDefinition as R, type DefinedQueueJobDefinition as S, type ExportedQueueJobDefinition as T, type NormalizedQueueDatabaseConnectionConfig as U, type NormalizedQueueFailedStoreConfig as V, type NormalizedQueuePluginConnectionConfig as W, type NormalizedQueueRedisConnectionConfig as X, type QueueConnectionConfig as Y, type QueueDatabaseConnectionConfig as Z, type QueueDispatchCompletedHook as _, type QueueJsonValue as a, type QueueEnqueueResult as a0, type QueueFailedStoreConfig as a1, type QueuePluginConnectionConfig as a2, type QueueRedisConnectionConfig as a3, type QueueReleaseOptions as a4, type QueueReserveInput as a5, type QueueSharedRedisConnectionConfig as a6, type QueueSyncConnectionConfig as a7, type QueueWorkerHooks as a8, defineJob as a9, holoQueueDefaults as aa, isQueueJobDefinition as ab, normalizeQueueConfig as ac, normalizeQueueJobDefinition as ad, queueInternals as ae, queueJobInternals as af, DEFAULT_REDIS_DB as ag, DEFAULT_REDIS_HOST as ah, DEFAULT_REDIS_PORT as ai, type RegisterQueueJobOptions as b, type QueueDriverFactory as c, type QueueSyncDriver as d, type QueueDriverFactoryContext as e, type QueueJobEnvelope as f, type QueueDriverDispatchResult as g, type QueueConnectionFacade as h, type QueuePayloadFor as i, type QueueDispatchOptions as j, type QueuePendingDispatch as k, type QueueResultFor as l, type HoloQueueConfig as m, type NormalizedHoloQueueConfig as n, type QueueSharedRedisConfig as o, type QueueFailedJobStore as p, type QueueRuntimeBinding as q, type QueueDriver as r, type QueueJobContextOverrides as s, type QueueJobContext as t, type QueueDispatchResult as u, type QueueDelayValue as v, type NormalizedQueueConnectionConfig as w, type QueueFailedJobRecord as x, type QueueReservedJob as y, type QueueClearInput as z };
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { G as DEFAULT_DATABASE_QUEUE_TABLE, I as DEFAULT_FAILED_JOBS_CONNECTION, J as DEFAULT_FAILED_JOBS_TABLE, K as DEFAULT_QUEUE_BLOCK_FOR, L as DEFAULT_QUEUE_CONNECTION, M as DEFAULT_QUEUE_NAME, O as DEFAULT_QUEUE_RETRY_AFTER, P as DEFAULT_QUEUE_SLEEP, ag as DEFAULT_REDIS_DB, ah as DEFAULT_REDIS_HOST, ai as DEFAULT_REDIS_PORT, m as HoloQueueConfig, n as NormalizedHoloQueueConfig, w as NormalizedQueueConnectionConfig, U as NormalizedQueueDatabaseConnectionConfig, V as NormalizedQueueFailedStoreConfig, W as NormalizedQueuePluginConnectionConfig, X as NormalizedQueueRedisConnectionConfig, N as NormalizedQueueSyncConnectionConfig, Y as QueueConnectionConfig, Z as QueueDatabaseConnectionConfig, a1 as QueueFailedStoreConfig, a2 as QueuePluginConnectionConfig, a3 as QueueRedisConnectionConfig, o as QueueSharedRedisConfig, a6 as QueueSharedRedisConnectionConfig, a7 as QueueSyncConnectionConfig, aa as holoQueueDefaults, ac as normalizeQueueConfig, ae as queueInternals } from './config-Bleufve4.js';
|