@mndrk/agx 1.4.28 → 1.4.29
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/lib/storage/runs.js +10 -2
- package/package.json +1 -1
package/lib/storage/runs.js
CHANGED
|
@@ -110,9 +110,17 @@ async function createRun({ projectSlug, taskSlug, stage, runId: explicitRunId, e
|
|
|
110
110
|
await ensureDir(paths.root);
|
|
111
111
|
await ensureDir(paths.artifacts);
|
|
112
112
|
|
|
113
|
-
//
|
|
113
|
+
// If run already exists, return handle to existing run (idempotent)
|
|
114
114
|
if (await fileExists(paths.meta)) {
|
|
115
|
-
|
|
115
|
+
const existingMeta = await readJson(paths.meta);
|
|
116
|
+
return {
|
|
117
|
+
runId: existingMeta.run_id || runId,
|
|
118
|
+
paths,
|
|
119
|
+
projectSlug,
|
|
120
|
+
taskSlug,
|
|
121
|
+
stage,
|
|
122
|
+
meta: existingMeta,
|
|
123
|
+
};
|
|
116
124
|
}
|
|
117
125
|
|
|
118
126
|
const now = new Date().toISOString();
|