Skip to content

feat: Ensure background task cancellation in startup_event #425

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

seer-by-sentry[bot]
Copy link

Fixes GITINGEST-2. The issue was that: Uvicorn cancels ASGI receive() during shutdown; Starlette's lifespan handler does not catch CancelledError.

  • Modified the startup_event function to use a try...finally block to ensure that the background task _remove_old_repositories is always cancelled, even if an exception occurs during the application's startup.

This fix was generated by Seer in Sentry, triggered by Mickael. 👁️ Run ID: 15919

Not quite right? Click here to continue debugging with Seer.

@MickaelCa MickaelCa force-pushed the seer/ensure-background-task-cancellation branch from 40f3cc9 to f06a6b5 Compare July 17, 2025 11:39
Copy link

github-actions bot commented Jul 17, 2025

⚙️ Preview environment was undeployed.

@MickaelCa MickaelCa added push-container Allow the PR to build & push a docker container instead of just building it and removed push-container Allow the PR to build & push a docker container instead of just building it deploy-pr-temp-env labels Jul 17, 2025
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