From 7ac3ab1e5eb147fbb8c3a95581e4880c2702d6f3 Mon Sep 17 00:00:00 2001 From: aiaug Date: Mon, 13 Jan 2025 13:49:16 +0900 Subject: [PATCH] fix:this commit should fix th env --- .github/workflows/web3-staging.yaml | 2 +- eve/tools/replicate_tool.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/web3-staging.yaml b/.github/workflows/web3-staging.yaml index 73658cc..b052e2a 100644 --- a/.github/workflows/web3-staging.yaml +++ b/.github/workflows/web3-staging.yaml @@ -1,4 +1,4 @@ -name: Deploy to Modal Staging +name: Deploy to Modal Web3-Staging on: push: diff --git a/eve/tools/replicate_tool.py b/eve/tools/replicate_tool.py index 72707e5..ec327d0 100644 --- a/eve/tools/replicate_tool.py +++ b/eve/tools/replicate_tool.py @@ -162,7 +162,12 @@ async def _create_prediction(self, args: dict, webhook=True): return prediction def get_webhook_url(): - env = "api-web3-prod" if os.getenv("DB") == "WEB3-PROD" else "api-web3-stage" + env = { + "PROD": "api-prod", + "STAGE": "api-stage", + "WEB3-PROD": "api-web3-prod", + "WEB3-STAGE": "api-web3-stage" + }.get(os.getenv("DB"), "api-web3-stage") dev = "-dev" if os.getenv("DB") == "WEB3-STAGE" and os.getenv("MODAL_SERVE") == "1" else "" webhook_url = f"https://edenartlab--{env}-fastapi-app{dev}.modal.run/update" return webhook_url