fix(crawler): guard ack_done/ack_failed/release on state='running' (0.35.3)
The three lease-ack functions matched their UPDATE on the job id alone. If a lease expired and another worker re-leased the row, a late ack from the original worker would clobber the new lease's state, leased_until, and (for release) decrement its attempts. Add `AND state = 'running'` to each UPDATE and log a warn when rows_affected is zero, so a stolen lease shows up in telemetry without blocking the new lease holder's progress. Three new integration tests pin the contract: - ack_done_no_ops_when_lease_was_stolen - ack_failed_no_ops_when_state_is_not_running - release_no_ops_when_state_is_not_running Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mangalord-frontend",
|
||||
"version": "0.35.2",
|
||||
"version": "0.35.3",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user