Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix monitoring emails for failed tasks in OSIDB #296

Merged
merged 2 commits into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions config/celery.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,14 @@
@signals.setup_logging.connect
def on_celery_setup_logging(**kwargs):
pass


@signals.worker_process_init.connect
def configure_worker_greenthreads(*args, **kwargs):
from gevent import monkey

monkey.patch_all()

from psycogreen import gevent

gevent.patch_psycopg()
2 changes: 1 addition & 1 deletion config/settings_prod.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
# Celery settings

REDIS_PASSWORD = get_env("OSIDB_REDIS_PASSWORD")
CELERY_BROKER_URL = CELERY_RESULT_BACKEND = f"rediss://:{REDIS_PASSWORD}@redis:6379/"
CELERY_BROKER_URL = f"rediss://:{REDIS_PASSWORD}@redis:6379/"
CELERY_BROKER_USE_SSL = {
"ssl_keyfile": "/opt/app-root/etc/redis/certs/osidb-redis.key",
"ssl_certfile": "/opt/app-root/etc/redis/certs/osidb-redis.crt",
Expand Down
2 changes: 1 addition & 1 deletion config/settings_stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
# Celery settings

REDIS_PASSWORD = get_env("OSIDB_REDIS_PASSWORD")
CELERY_BROKER_URL = CELERY_RESULT_BACKEND = f"rediss://:{REDIS_PASSWORD}@redis:6379/"
CELERY_BROKER_URL = f"rediss://:{REDIS_PASSWORD}@redis:6379/"
CELERY_BROKER_USE_SSL = {
"ssl_keyfile": "/opt/app-root/etc/redis/certs/osidb-redis.key",
"ssl_certfile": "/opt/app-root/etc/redis/certs/osidb-redis.crt",
Expand Down
Loading