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

Remove domain verify signal and task #7763

Merged
merged 1 commit into from
Dec 21, 2020
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
3 changes: 0 additions & 3 deletions readthedocs/projects/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,3 @@

# Used to purge files from the CDN
files_changed = django.dispatch.Signal(providing_args=['project', 'version', 'files'])

# Used to force verify a domain (eg. for SSL cert issuance)
domain_verify = django.dispatch.Signal(providing_args=['domain'])
15 changes: 0 additions & 15 deletions readthedocs/projects/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
after_vcs,
before_build,
before_vcs,
domain_verify,
files_changed,
)

Expand Down Expand Up @@ -1877,20 +1876,6 @@ def finish_inactive_builds():
)


@app.task(queue='web')
def retry_domain_verification(domain_pk):
"""
Trigger domain verification on a domain.

:param domain_pk: a `Domain` pk to verify
"""
domain = Domain.objects.get(pk=domain_pk)
domain_verify.send(
sender=domain.__class__,
domain=domain,
)


@app.task(queue='web')
def send_build_status(build_pk, commit, status, link_to_build=False):
"""
Expand Down
11 changes: 5 additions & 6 deletions readthedocs/projects/views/private.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
)
from readthedocs.search.models import SearchQuery

from ..tasks import retry_domain_verification

log = logging.getLogger(__name__)

Expand Down Expand Up @@ -712,11 +711,11 @@ def get_context_data(self, **kwargs):
ctx = super().get_context_data(**kwargs)

# Get the default docs domain
ctx['default_domain'] = settings.PUBLIC_DOMAIN if settings.USE_SUBDOMAIN else settings.PRODUCTION_DOMAIN # noqa

# Retry validation on all domains if applicable
for domain in ctx['domain_list']:
retry_domain_verification.delay(domain_pk=domain.pk)
ctx['default_domain'] = (
settings.PUBLIC_DOMAIN
if settings.USE_SUBDOMAIN
else settings.PRODUCTION_DOMAIN
)

return ctx

Expand Down