Skip to content

Fix update-wikidata not being interruptable#252

Open
Qup42 wants to merge 2 commits intoqlever-dev:mainfrom
Qup42:fix/updateWikidataInterruption
Open

Fix update-wikidata not being interruptable#252
Qup42 wants to merge 2 commits intoqlever-dev:mainfrom
Qup42:fix/updateWikidataInterruption

Conversation

@Qup42
Copy link
Collaborator

@Qup42 Qup42 commented Jan 23, 2026

There were two problems which made it extremely annoying to terminate update-wikidata related to the retry logic:

  1. retry_with_backoff did not respect ctrl_c_pressed and continued to retry although a termination was requested
  2. KeyboardInterrupt is only raised after time.sleep in retry_with_backoff, which can take substantial time

Moved retry_with_backoff into the class and respect ctrl_c_pressed. Use Threading.Event for interruptible waiting. This also made the waiting in another place nicer.

@Qup42 Qup42 requested a review from hannahbast January 23, 2026 10:14
@Qup42 Qup42 changed the title Fx update-wikidata not being interruptable Fix update-wikidata not being interruptable Jan 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant