Skip to content

Commit

Permalink
[feature ] alerts thread gracefully stopped during shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
rajvarkala committed Jan 4, 2024
1 parent 3e278dc commit b61c938
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion git-tags.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"source-postgres": "0.1.13"
}

valmi_core = "0.1.19"
valmi_core = "0.1.20"

valmi_app_backend = "0.1.19"

Expand Down
5 changes: 4 additions & 1 deletion src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
from contextlib import asynccontextmanager
from utils.request_logger import RouterLoggingMiddleware
from observability import setup_observability

from alerts import AlertGenerator

@asynccontextmanager
async def lifespan(app: FastAPI):
Expand Down Expand Up @@ -71,6 +71,9 @@ async def lifespan(app: FastAPI):
logging.info("Shutting down Image manager")
img_manager.destroy()

logging.info("Shutting down Alert Generator")
AlertGenerator().destroy()

logging.info("All services shut down successfully")


Expand Down

0 comments on commit b61c938

Please sign in to comment.