Skip to content

Commit

Permalink
fix: move pusher_disabled check inside get_pusher_client for test to …
Browse files Browse the repository at this point in the history
…respect that
  • Loading branch information
Kiryous committed Dec 19, 2024
1 parent 0f19003 commit 267cb96
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions keep/api/core/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
# Just a fake random tenant id
SINGLE_TENANT_UUID = "keep"
SINGLE_TENANT_EMAIL = "admin@keephq"
PUSHER_DISABLED = os.environ.get("PUSHER_DISABLED", "false") == "true"


async def extract_generic_body(request: Request) -> dict | bytes | FormData:
"""
Expand All @@ -39,12 +37,13 @@ async def extract_generic_body(request: Request) -> dict | bytes | FormData:


def get_pusher_client() -> Pusher | None:
pusher_disabled = os.environ.get("PUSHER_DISABLED", "false") == "true"
pusher_host = os.environ.get("PUSHER_HOST")
pusher_app_id = os.environ.get("PUSHER_APP_ID")
pusher_app_key = os.environ.get("PUSHER_APP_KEY")
pusher_app_secret = os.environ.get("PUSHER_APP_SECRET")
if (
PUSHER_DISABLED
pusher_disabled
or pusher_app_id is None
or pusher_app_key is None
or pusher_app_secret is None
Expand Down

0 comments on commit 267cb96

Please sign in to comment.