Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into dependabot/pip/backen…
Browse files Browse the repository at this point in the history
…d/api/aiohttp-3.10.2
  • Loading branch information
Bhavdeep13 committed Sep 30, 2024
2 parents 33f9ace + 118566d commit 3f4c344
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
11 changes: 3 additions & 8 deletions backend/api/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -766,8 +766,7 @@ async def check_orion():
"message": None if status else "Failed to connect"}
except Exception as e:
logging.error(f"Error checking Orion: {e}")
return {"status": False, "latency": latency,
"latency_unit": "ms", "message": str(e)}
return {"status": False, "message": str(e)}
async def check_postgres():
"""
Check whether the PostgreSQL database is running properly.
Expand All @@ -780,10 +779,8 @@ async def check_postgres():
return {"status": True, "latency": latency,
"latency_unit": "ms", "message": None}
except Exception as e:
latency = (time.time() - start_time)*1000
logging.error(f"Error checking PostgreSQL: {e}")
return {"status": False, "latency": latency,
"latency_unit": "ms", "message": str(e)}
return {"status": False, "message": str(e)}
async def check_redis():
"""
Check whether the Redis cache is running properly.
Expand All @@ -795,10 +792,8 @@ async def check_redis():
return {"status": True, "latency": latency,
"latency_unit": "ms", "message": None}
except Exception as e:
latency = (time.time() - start_time)*1000
logging.error(f"Error checking Redis: {e}")
return {"status": False, "latency": latency,
"latency_unit": "ms", "message": str(e)}
return {"status": False, "message": str(e)}
if __name__ == "__main__":
uvicorn.run(app, host="0.0.0.0", port=8000, reload=True,
log_level=settings.LOG_LEVEL.lower())
3 changes: 2 additions & 1 deletion backend/api/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
asyncpg==0.27.0
fastapi==0.98.0
aiohttp==3.10.2
fastapi==0.109.1
aiohttp==3.8.4
pydantic==1.10.7
redis==4.5.4
uvicorn==0.22.0
Expand Down
6 changes: 3 additions & 3 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3f4c344

Please sign in to comment.