Skip to content

Commit

Permalink
updating code to use booleans rather than 'true''false' (#2262)
Browse files Browse the repository at this point in the history
  • Loading branch information
P0NDER0SA authored Aug 22, 2024
1 parent 70c478f commit 4eb8d7e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/celery/celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def init_app(self, app):
task_cls=make_task(app),
)

if app.config["AWS_XRAY_ENABLED"] == "true":
if app.config["AWS_XRAY_ENABLED"]:
# Register the xray handlers
signals.after_task_publish.connect(xray_after_task_publish)
signals.before_task_publish.connect(xray_before_task_publish)
Expand Down
2 changes: 1 addition & 1 deletion app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ class Config(object):
NOTIFY_LOG_PATH = os.getenv("NOTIFY_LOG_PATH")

# AWS Xray
AWS_XRAY_ENABLED = os.getenv("AWS_XRAY_ENABLED", "false")
AWS_XRAY_ENABLED = env.bool("AWS_XRAY_ENABLED", False)

# Cronitor
CRONITOR_ENABLED = False
Expand Down
2 changes: 1 addition & 1 deletion application.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

app = create_app(application)

if app.config["AWS_XRAY_ENABLED"] == "true":
if app.config["AWS_XRAY_ENABLED"]:
xray_recorder.configure(service='api')
XRayMiddleware(app, xray_recorder)

Expand Down
2 changes: 1 addition & 1 deletion run_celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
application = Flask("celery")
create_app(application)

if application.config["AWS_XRAY_ENABLED"] == "true":
if application.config["AWS_XRAY_ENABLED"]:
xray_recorder.configure(service='celery')
XRayMiddleware(application, xray_recorder)

Expand Down

0 comments on commit 4eb8d7e

Please sign in to comment.