@falcondev-oss/workflow 0.7.0 → 0.7.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/README.md +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.mjs +4 -2
- package/package.json +4 -2
package/README.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -88,6 +88,7 @@ interface WorkflowOptions<RunInput, Input, Output> {
|
|
|
88
88
|
getGroupId?: (input: IsUnknown<Input> extends true ? undefined : Input) => string | undefined | Promise<string | undefined>;
|
|
89
89
|
queueOptions?: WorkflowQueueOptions;
|
|
90
90
|
workerOptions?: WorkflowWorkerOptions<Input>;
|
|
91
|
+
jobOptions?: WorkflowJobRunOptions<Input>;
|
|
91
92
|
redis?: IORedis;
|
|
92
93
|
}
|
|
93
94
|
type WorkflowJobRunOptions<Input> = SetOptional<Except<AddOptions<WorkflowJobPayloadInternal<Input>>, 'data'>, 'groupId'> & {
|
package/dist/index.mjs
CHANGED
|
@@ -269,6 +269,7 @@ var Workflow = class {
|
|
|
269
269
|
}, async () => {
|
|
270
270
|
const tracingHeaders = {};
|
|
271
271
|
propagation.inject(context.active(), tracingHeaders);
|
|
272
|
+
const orderMs = opts?.orderMs ?? (opts?.priority === "high" ? 0 : void 0) ?? this.opts.jobOptions?.orderMs ?? (this.opts.jobOptions?.priority === "high" ? 0 : void 0);
|
|
272
273
|
return new WorkflowJob({ job: await queue.add({
|
|
273
274
|
groupId: await this.opts.getGroupId?.(parsedInput?.value) ?? randomUUID(),
|
|
274
275
|
data: serialize$1({
|
|
@@ -276,8 +277,9 @@ var Workflow = class {
|
|
|
276
277
|
stepData: {},
|
|
277
278
|
tracingHeaders
|
|
278
279
|
}),
|
|
279
|
-
|
|
280
|
-
...opts
|
|
280
|
+
...this.opts.jobOptions,
|
|
281
|
+
...opts,
|
|
282
|
+
orderMs
|
|
281
283
|
}) });
|
|
282
284
|
});
|
|
283
285
|
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@falcondev-oss/workflow",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.7.
|
|
5
|
-
"description": "Simple type-safe queue worker with durable execution
|
|
4
|
+
"version": "0.7.1",
|
|
5
|
+
"description": "Simple type-safe queue worker with durable execution using Redis.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": "github:falcondev-oss/workflow",
|
|
8
8
|
"bugs": {
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
"queue",
|
|
13
13
|
"worker",
|
|
14
14
|
"bullmq",
|
|
15
|
+
"redis",
|
|
16
|
+
"groupmq",
|
|
15
17
|
"durable-execution",
|
|
16
18
|
"tracing",
|
|
17
19
|
"typescript"
|