@atolis-hq/wake 0.3.31 → 0.3.32
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.
|
@@ -56,7 +56,7 @@ export function createSurfaceWorkApplications(root, now) {
|
|
|
56
56
|
const context = commandContext(command.idempotencyKey, now);
|
|
57
57
|
const correlations = await root.resources.correlationsForWork(id);
|
|
58
58
|
await root.work.delete(id, context);
|
|
59
|
-
await Promise.all(correlations.map((entry) => root.resources.retract(entry.resourceId, id, context)));
|
|
59
|
+
await Promise.all(correlations.map((entry) => root.resources.retract(entry.resourceId, id, resourceRetractionContext(context, entry.resourceId))));
|
|
60
60
|
return accepted(command.idempotencyKey, now());
|
|
61
61
|
},
|
|
62
62
|
async retry(key, command) {
|
|
@@ -179,6 +179,9 @@ function commandContext(idempotencyKey, now) {
|
|
|
179
179
|
actor: { kind: EventActorKind.Operator, id: 'web' },
|
|
180
180
|
};
|
|
181
181
|
}
|
|
182
|
+
function resourceRetractionContext(context, resourceId) {
|
|
183
|
+
return { ...context, commandId: `${context.commandId}:resource:${resourceId}` };
|
|
184
|
+
}
|
|
182
185
|
function accepted(idempotencyKey, acceptedAt) {
|
|
183
186
|
return {
|
|
184
187
|
commandId: `work:${idempotencyKey}`,
|