flowscale 1.0.17-beta.2 → 1.0.17-beta.4
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 +3 -24
- package/dist/index.js +5 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -159,28 +159,7 @@ console.log('Queue Details:', queue);
|
|
|
159
159
|
|
|
160
160
|
---
|
|
161
161
|
|
|
162
|
-
### 3. `
|
|
163
|
-
|
|
164
|
-
**Description:**
|
|
165
|
-
Warms up the ComfyUI instances in the cluster to prepare them for processing workflows.
|
|
166
|
-
|
|
167
|
-
**Usage:**
|
|
168
|
-
```javascript
|
|
169
|
-
const warmUpResult = await flowscale.warmUp();
|
|
170
|
-
console.log('Warm-up Result:', warmUpResult);
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
**Response Example:**
|
|
174
|
-
```json
|
|
175
|
-
{
|
|
176
|
-
"status": "success",
|
|
177
|
-
"message": "ComfyUI instances warmed up successfully"
|
|
178
|
-
}
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
---
|
|
182
|
-
|
|
183
|
-
### 4. `getWorkflows()`
|
|
162
|
+
### 3. `getWorkflows()`
|
|
184
163
|
|
|
185
164
|
**Description:**
|
|
186
165
|
Retrieves the list of all deployed workflows available in the cluster.
|
|
@@ -216,7 +195,7 @@ console.log('Available Workflows:', workflows);
|
|
|
216
195
|
|
|
217
196
|
---
|
|
218
197
|
|
|
219
|
-
###
|
|
198
|
+
### 4. `executeWorkflow(workflowId, data, groupId?)`
|
|
220
199
|
|
|
221
200
|
**Description:**
|
|
222
201
|
Trigger a workflow execution using its unique `workflowId`. Input data and an optional `groupId` can be provided for better organization and tracking.
|
|
@@ -258,7 +237,7 @@ console.log('Workflow Result:', result);
|
|
|
258
237
|
|
|
259
238
|
---
|
|
260
239
|
|
|
261
|
-
### 5
|
|
240
|
+
### 5 `executeWorkflowAsync(workflowId, data, groupId?, pollIntervalMs?, timeoutMs?)`
|
|
262
241
|
|
|
263
242
|
**Description:**
|
|
264
243
|
Execute a workflow and automatically wait for the result by polling the output. This is a convenience method that combines `executeWorkflow` and `getOutput` with automatic polling.
|
package/dist/index.js
CHANGED
|
@@ -184,8 +184,11 @@ var FlowscaleAPI = /** @class */ (function () {
|
|
|
184
184
|
return [4 /*yield*/, this.getOutput(outputName)];
|
|
185
185
|
case 4:
|
|
186
186
|
output = _c.sent();
|
|
187
|
-
|
|
188
|
-
|
|
187
|
+
console.log("DEBUG:", output);
|
|
188
|
+
if (output) {
|
|
189
|
+
if (output.status === 'success' && output.data.generation_status === 'completed') {
|
|
190
|
+
return [2 /*return*/, output];
|
|
191
|
+
}
|
|
189
192
|
}
|
|
190
193
|
return [3 /*break*/, 6];
|
|
191
194
|
case 5:
|