Skip to content

Commit

Permalink
fix:this commit should fix the env
Browse files Browse the repository at this point in the history
  • Loading branch information
aiaug committed Jan 13, 2025
1 parent f6a5bc5 commit d6f354a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/web3-prod.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy to Modal Production
name: Deploy to Modal Web3-Production

on:
push:
Expand Down
7 changes: 6 additions & 1 deletion eve/tools/replicate_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d6f354a

Please sign in to comment.