diff --git a/.github/workflows/web3-prod.yaml b/.github/workflows/web3-prod.yaml index aaa6ff1..8972c60 100644 --- a/.github/workflows/web3-prod.yaml +++ b/.github/workflows/web3-prod.yaml @@ -1,4 +1,4 @@ -name: Deploy to Modal Production +name: Deploy to Modal Web3-Production on: push: diff --git a/eve/tools/replicate_tool.py b/eve/tools/replicate_tool.py index be865e3..537ea5e 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