@brandboostinggmbh/observable-workflows 0.4.1 → 0.4.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/dist/index.js +4 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -197,11 +197,13 @@ async function createStepContext(context) {
|
|
|
197
197
|
const stepNameParam = typeof step$1 === "string" ? step$1 : step$1.name;
|
|
198
198
|
const stepMetadataParam = typeof step$1 === "string" ? void 0 : step$1.metadata;
|
|
199
199
|
if (context.parentInstanceId && reuseSuccessfulSteps) {
|
|
200
|
+
console.warn("temp: try to reuse successful steps");
|
|
200
201
|
const existingStep = await context.D1.prepare(
|
|
201
202
|
/* sql */
|
|
202
203
|
`SELECT * FROM StepTable WHERE instanceId = ? AND stepName = ? AND tenantId = ?`
|
|
203
204
|
).bind(context.parentInstanceId, stepNameParam, context.tenantId).first();
|
|
204
205
|
if (existingStep) {
|
|
206
|
+
console.warn("temp: found existing step", existingStep);
|
|
205
207
|
const row = existingStep;
|
|
206
208
|
if (row.status === "completed") {
|
|
207
209
|
await insertStepRecordFull(context, {
|
|
@@ -216,8 +218,8 @@ async function createStepContext(context) {
|
|
|
216
218
|
});
|
|
217
219
|
return context.serializer.deserialize(row.result);
|
|
218
220
|
}
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
+
} else console.warn("temp: no existing step found");
|
|
222
|
+
} else console.warn("temp: not trying to reuse successful steps");
|
|
221
223
|
let waitFor = [];
|
|
222
224
|
const startTime = Date.now();
|
|
223
225
|
const stepStatus = "pending";
|