python fastapi graceful shutdown