@gentbajko/slopify 4.5.7 → 4.5.8
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.
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Slopify 4.5.8
|
|
2
|
+
|
|
3
|
+
Released 1 December 2026.
|
|
4
|
+
|
|
5
|
+
A schedule's video no longer reads Failed after a restart because a step was running at that moment.
|
|
6
|
+
|
|
7
|
+
## A step a restart interrupted goes on by itself
|
|
8
|
+
|
|
9
|
+
- **A schedule's video no longer reads Failed after a restart.** A step that was running when Slopify stopped is marked failed, "interrupted", and Slopify 4.5.6 only continued runs a restart had stopped, not these. A video made ahead, or one its day already took, then read Failed until someone pressed Try again. Now, a minute after Slopify starts, such a video goes on like any other a restart stopped, with the same limits: a project you paused stays paused, a checkpoint of yours still waits for you, and a step that failed for a reason of its own still waits for Try again.
|
|
10
|
+
- Technical: `continueStopped` (`schedules/continue-stopped.ts`) also takes a project whose failed stages all have `failure_reason='interrupted'` (`markInterruptedStages`, `main.ts`), including one `projectIsActive` reads as failed, and continues it with `continueHeldRun`.
|
|
@@ -14,7 +14,21 @@ function scheduledProjects(db) {
|
|
|
14
14
|
WHERE r.projects_settled_at IS NULL AND r.status!='running'`)
|
|
15
15
|
.all()
|
|
16
16
|
.map((row) => z.string().parse(row.id));
|
|
17
|
-
return [...new Set(ids)].filter(
|
|
17
|
+
return [...new Set(ids)].filter(
|
|
18
|
+
// A run failed only by the restart reads Failed, so is no active project; it counts here.
|
|
19
|
+
(id) => projectIsActive(db, id) ||
|
|
20
|
+
(interruptedOnly(db, id) &&
|
|
21
|
+
db.prepare("SELECT 1 FROM project_trash WHERE project_id=?").get(id) === undefined));
|
|
22
|
+
}
|
|
23
|
+
// A step running when Slopify stopped reads failed, "interrupted" (`markInterruptedStages` in
|
|
24
|
+
// `main.ts`), with its work held like any other a restart stopped. A run failed only that way
|
|
25
|
+
// goes on too; one with a failure of its own waits for Try again.
|
|
26
|
+
function interruptedOnly(db, projectId) {
|
|
27
|
+
const reasons = db
|
|
28
|
+
.prepare("SELECT failure_reason AS reason FROM stages WHERE project_id=? AND state='failed'")
|
|
29
|
+
.all(projectId)
|
|
30
|
+
.map((row) => row.reason);
|
|
31
|
+
return reasons.length > 0 && reasons.every((reason) => reason === "interrupted");
|
|
18
32
|
}
|
|
19
33
|
// A restart stops every run that was going (`recoverWork`), and a schedule's videos then read
|
|
20
34
|
// Stopped until someone presses Continue the run: a made-ahead video until its day, and one its
|
|
@@ -28,7 +42,8 @@ export async function continueStopped(deps) {
|
|
|
28
42
|
return [];
|
|
29
43
|
const continued = [];
|
|
30
44
|
for (const projectId of scheduledProjects(deps.db)) {
|
|
31
|
-
if (!projectHolds(deps.db, { projectId }).stopped.has(projectId)
|
|
45
|
+
if (!projectHolds(deps.db, { projectId }).stopped.has(projectId) &&
|
|
46
|
+
!interruptedOnly(deps.db, projectId))
|
|
32
47
|
continue;
|
|
33
48
|
try {
|
|
34
49
|
const outcome = await continueRun(projectId);
|