Skip to content

worker: don't destroy until all outstanding claims have come home - #1044

Merged
josephjclark merged 5 commits into
mainfrom
dont-destroy-while-claims-active
Oct 3, 2025
Merged

josephjclark merged 5 commits into
mainfrom
dont-destroy-while-claims-active

Conversation

@josephjclark

Copy link
Copy Markdown
Collaborator

Short Description

No issue: I learned this afternoon that some lost runs are caused by the worker receiving a SIGTERM while claims are still outstanding.

If lightning happens to have released these claims, the worker will shut down and renege on its promise to complete the work.

As a result of this PR, the worker will now wait for all outstanding claims, and their associated runs, before shutting down.

Most of the effort was in getting the test to work - took a bunch of refactoring 😅

AI Usage

Please disclose how you've used AI in this work (it's cool, we just want to know!):

  • Code generation (copilot but not intellisense)
  • Learning or fact checking
  • Strategy / design
  • Optimisation / refactoring
  • Translation / spellchecking / doc gen
  • Other
  • I have not used AI

You can read more details in our Responsible AI Policy

@github-project-automation github-project-automation Bot moved this to New Issues in Core Oct 3, 2025
@josephjclark
josephjclark merged commit 14a0eca into main Oct 3, 2025
7 checks passed
@josephjclark
josephjclark deleted the dont-destroy-while-claims-active branch October 3, 2025 16:52
@github-project-automation github-project-automation Bot moved this from New Issues to Done in Core Oct 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant