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

Send domain registration email even if load_template_apps fails #35552

Closed
wants to merge 1 commit into from
Closed
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
28 changes: 11 additions & 17 deletions corehq/apps/registration/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from django.template.loader import render_to_string
from django.utils.translation import gettext

from celery import chord
from celery import group

from dimagi.utils.couch import CriticalSection
from dimagi.utils.couch.database import get_safe_write_kwargs
Expand Down Expand Up @@ -191,24 +191,18 @@ def request_new_domain(request, project_name, is_new_user=True, is_new_sso_user=
if settings.IS_SAAS_ENVIRONMENT:
# Load template apps to the user's new domain in parallel
from corehq.apps.app_manager.tasks import load_appcues_template_app
header = [
load_template_apps = group([
load_appcues_template_app.si(new_domain.name, current_user.username, slug)
for slug in APPCUES_APP_SLUGS
]
callback = send_domain_registration_email.si(
request.user.email,
dom_req.domain,
dom_req.activation_guid,
request.user.get_full_name(),
request.user.first_name
)
chord(header)(callback)
else:
send_domain_registration_email(request.user.email,
dom_req.domain,
dom_req.activation_guid,
request.user.get_full_name(),
request.user.first_name)
])
load_template_apps()

send_domain_registration_email(request.user.email,
dom_req.domain,
dom_req.activation_guid,
request.user.get_full_name(),
request.user.first_name)

send_new_request_update_email(
request.user,
get_ip(request),
Expand Down
Loading