Skip to content

Commit

Permalink
Put BROKER_URL in
Browse files Browse the repository at this point in the history
This will enable us to use SQS for our staging and production environments
  • Loading branch information
jonodrew committed May 26, 2023
1 parent ea1a879 commit 5248241
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/trunk-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
- get-commit-tag
env:
ENV: integration
BROKER_URL: redis://localhost:6379/0
GH_IMAGE_COMMIT_TAG: ${{ needs.get-commit-tag.outputs.image_commit_tag }}
runs-on: ubuntu-20.04
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(

cluster = ecs.Cluster(self, "MentorMatchCluster", vpc=vpc)

broker_vars = {"broker_url": "sqs://"}
broker_vars = {"BROKER_URL": "sqs://"}

web_service = ApplicationLoadBalancedFargateService(
self,
Expand Down
7 changes: 3 additions & 4 deletions mentor_match_web/app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@


class Config:
result_backend = os.environ.get("REDIS_URL", "BROKEN")
broker_url = os.environ.get("REDIS_URL", "BROKEN!!")
result_backend = os.environ.get("BROKER_URL", "BROKEN")
broker_url = os.environ.get("BROKER_URL", "BROKEN!!")


class TestConfig(Config):
Expand All @@ -15,5 +15,4 @@ class TestConfig(Config):
"interval_step": 0.2,
"interval_max": 0.5,
}
if os.environ.get("REDIS_URL") is None:
os.environ["REDIS_URL"] = "redis://localhost:6379/0"
broker_url = "redis://localhost:6379/0"
4 changes: 2 additions & 2 deletions mentor_match_web/app/extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

celery_app = Celery(
"celery_app",
backend=os.environ["REDIS_URL"],
broker=os.environ["REDIS_URL"],
backend=os.environ["BROKER_URL"],
broker=os.environ["BROKER_URL"],
include=["app.tasks.tasks"],
accept_content=["pickle", "json"],
task_serializer="pickle",
Expand Down

0 comments on commit 5248241

Please sign in to comment.