@aion0/forge 0.10.74 → 0.10.75
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/RELEASE_NOTES.md +6 -3
- package/lib/pipeline.ts +8 -1
- package/package.json +1 -1
package/RELEASE_NOTES.md
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
# Forge v0.10.
|
|
1
|
+
# Forge v0.10.75
|
|
2
2
|
|
|
3
3
|
Released: 2026-06-11
|
|
4
4
|
|
|
5
|
-
## Changes since v0.10.
|
|
5
|
+
## Changes since v0.10.74
|
|
6
6
|
|
|
7
|
+
### Other
|
|
8
|
+
- fix(pipeline): orphan reaper only kills tasks older than this boot
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
|
|
11
|
+
**Full Changelog**: https://github.com/aiwatching/forge/compare/v0.10.74...v0.10.75
|
package/lib/pipeline.ts
CHANGED
|
@@ -1663,13 +1663,20 @@ function reapOrphanedPipelineTasks() {
|
|
|
1663
1663
|
if (reapedOrphans) return;
|
|
1664
1664
|
reapedOrphans = true;
|
|
1665
1665
|
try {
|
|
1666
|
+
// This timer arms on MODULE load, which in a lazy-loading Next.js worker
|
|
1667
|
+
// can be minutes after the actual server boot — by then this very boot
|
|
1668
|
+
// may have live tasks. Only treat a task as a previous-boot corpse if it
|
|
1669
|
+
// started BEFORE this process did; a live task can never predate its
|
|
1670
|
+
// own parent.
|
|
1671
|
+
const bootAt = Date.now() - process.uptime() * 1000;
|
|
1666
1672
|
const pipelines = listPipelines().filter(p => p.status === 'running');
|
|
1667
1673
|
let reaped = 0;
|
|
1668
1674
|
for (const pipeline of pipelines) {
|
|
1669
1675
|
for (const node of Object.values(pipeline.nodes)) {
|
|
1670
1676
|
if (node.status === 'running' && node.taskId) {
|
|
1671
1677
|
const t = getTask(node.taskId);
|
|
1672
|
-
|
|
1678
|
+
const tStart = Date.parse(t?.startedAt || t?.createdAt || '') || 0;
|
|
1679
|
+
if (t && t.status === 'running' && tStart > 0 && tStart < bootAt) {
|
|
1673
1680
|
try {
|
|
1674
1681
|
cancelTask(node.taskId);
|
|
1675
1682
|
reaped += 1;
|
package/package.json
CHANGED