Cancel translate jobs instantly by running tsx in background

Fixkamo-internal
Shipped
April 29, 2026 at 1:46 AM UTC
Author
kamo
Commit
9ecea82

When Forgejo cancels a workflow, bash waits for any foreground child to finish before processing the signal — so a running tsx locale job would block cancellation for minutes, holding the runner slot. Fix: run tsx with & and wait $CHILD_PID. bash exits wait() immediately on SIGTERM, the trap fires at once and SIGKILL-s both tsx and the port-forward. Belt-and-suspenders: write our bash PID to a known file **************** so the next invocation can kill any survivor even if the runner used SIGKILL and the trap never ran.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing