add healtcheck api endpoint
This commit is contained in:
parent
206471cee8
commit
4e7734d327
1 changed files with 8 additions and 1 deletions
|
|
@ -58,6 +58,11 @@ app.add_middleware(
|
|||
)
|
||||
|
||||
|
||||
@app.get("/api/status")
|
||||
async def get_status():
|
||||
return {"status": "OK"}
|
||||
|
||||
|
||||
@app.get("/api/listing")
|
||||
async def get_listing(user: Annotated[User, Depends(get_current_user)]):
|
||||
repository = ListingRepository(engine)
|
||||
|
|
@ -83,7 +88,9 @@ async def refresh_listings(
|
|||
user: Annotated[User, Depends(get_current_user)],
|
||||
query_parameters: Annotated[QueryParameters, Query()],
|
||||
) -> dict[str, str]:
|
||||
await send_notification(f"{user.email} refreshing listings with query parameters {query_parameters.model_dump_json()}")
|
||||
await send_notification(
|
||||
f"{user.email} refreshing listings with query parameters {query_parameters.model_dump_json()}"
|
||||
)
|
||||
# TODO: rate limit
|
||||
expiry_time = datetime.now() + timedelta(minutes=10)
|
||||
task = listing_tasks.dump_listings_task.apply_async(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue