filed

Job queue using FUSE

git clone git://mccd.space/filed

commit 2bf3b95fee7e93321c985b4245c4c4a20e688807
parent d9ff9f5cc67e55ffa1a3d9dca0da4433926b2aa7
Author: Marc Coquand <marc@coquand.email>
Date:   Wed, 17 Dec 2025 12:22:25 +0100

Add warning

Diffstat:
Mmanager.go | 2++
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/manager.go b/manager.go
@@ -128,6 +128,8 @@ func (jm *JobManager) runJob(id, commandStr string) {
 		slog.Warn("Worker: Job failed", "id", id, "error", err, "exitCode", exitCode)
 		errMsg := fmt.Sprintf("\n\n[System Error]: %v\n", err)
 		jobOutput = append(jobOutput, []byte(errMsg)...)
+		// This can return an error if the job is cancelled by removing it.
+		// Probably we should handle it more gracefully
 		jm.store.RestartJob(id, jobOutput)
 	} else {
 		slog.Info("Worker: Job completed", "id", id, "exitCode", exitCode)