Keeping one account out of two hands
A LinkedIn account can only have one browser session at a time. Two workers touching the same account gets it flagged. Every job therefore acquires a per-tenant Redis lock before it opens a browser, and extends that lock on a heartbeat while it works — so if a worker dies mid-job, the lock expires on its own instead of deadlocking the account.
Around that: stale-job recovery for anything stuck past ten minutes,
duplicate-job prevention keyed on account plus target plus action, and a
thirty-second drain on SIGTERM so a deploy never kills a
job mid-flight.