You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Snowflake storage backend writes VRS object batches asynchronously. Untimely termination could therefore result in pending batches being discarded. Providing an API for graceful shutdown would allow for all pending batches to be written prior to termination. This API should be callable as a PreStop hook in Kubernetes: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/
Given the process model used by ASGI, it would be improper to place a shutdown API in the app itself. Startup/shutdown is the responsibility of the web server, such as uvicorn or gunicorn.
Instead, AnyVar app should perform a graceful shutdown of the storage integration when a shutdown is occurs. This can be implemented by lifespan events, which are already in use for startup.
The Snowflake storage backend writes VRS object batches asynchronously. Untimely termination could therefore result in pending batches being discarded. Providing an API for graceful shutdown would allow for all pending batches to be written prior to termination. This API should be callable as a PreStop hook in Kubernetes: https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/
See also #64
The text was updated successfully, but these errors were encountered: