KamoCRM

Cancel translate jobs instantly by running tsx in background

Fixkamo-internal
Shipped
29 ஏப்ரல், 2026 அன்று 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?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing