keryx 0.23.1 → 0.23.2
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/initializers/actionts.ts +28 -6
- package/package.json +1 -1
package/initializers/actionts.ts
CHANGED
|
@@ -109,13 +109,35 @@ export class Actions extends Initializer {
|
|
|
109
109
|
* Enqueues one job per item, injects `_fanOutId` into each,
|
|
110
110
|
* and stores metadata in Redis for result collection.
|
|
111
111
|
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
* Returns a FanOutResult with the fanOutId for later status queries.
|
|
112
|
+
* @returns A {@link FanOutResult} containing the `fanOutId` for later
|
|
113
|
+
* status queries via {@link fanOutStatus}.
|
|
114
|
+
* @throws {TypedError} With `ErrorType.CONNECTION_TASK_DEFINITION` if any
|
|
115
|
+
* referenced action is not registered.
|
|
117
116
|
*/
|
|
118
|
-
fanOut
|
|
117
|
+
fanOut: {
|
|
118
|
+
/**
|
|
119
|
+
* Single-action form: enqueue one job per entry in `inputsArray`, all for the same action.
|
|
120
|
+
*
|
|
121
|
+
* @param actionName - Name of the action to enqueue for every job.
|
|
122
|
+
* @param inputsArray - One input object per child job. An empty array is allowed.
|
|
123
|
+
* @param queue - Optional queue override for every job. Falls back to the action's configured queue, then `DEFAULT_QUEUE`.
|
|
124
|
+
* @param options - Fan-out options (batch size, result TTL, correlation ID).
|
|
125
|
+
*/
|
|
126
|
+
(
|
|
127
|
+
actionName: string,
|
|
128
|
+
inputsArray: TaskInputs[],
|
|
129
|
+
queue?: string,
|
|
130
|
+
options?: FanOutOptions,
|
|
131
|
+
): Promise<FanOutResult>;
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Multi-action form: enqueue heterogeneous jobs, each with its own action and optional queue override.
|
|
135
|
+
*
|
|
136
|
+
* @param jobs - Job descriptors. Each entry must reference a registered action.
|
|
137
|
+
* @param options - Fan-out options (batch size, result TTL, correlation ID).
|
|
138
|
+
*/
|
|
139
|
+
(jobs: FanOutJob[], options?: FanOutOptions): Promise<FanOutResult>;
|
|
140
|
+
} = async (
|
|
119
141
|
actionNameOrJobs: string | FanOutJob[],
|
|
120
142
|
inputsArrayOrOptions?: TaskInputs[] | FanOutOptions,
|
|
121
143
|
queue?: string,
|