Skip to content

Commit bc2c047

Browse files
committed
Merge branch 'humitos/async/initial-build' of github.com:rtfd/readthedocs.org into humitos/async/initial-build
2 parents deb877d + 7792671 commit bc2c047

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

readthedocs/projects/signals.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import django.dispatch
55
from django.dispatch import receiver
66

7+
from readthedocs.core.utils import trigger_build
78
from readthedocs.oauth.utils import attach_webhook
89

910

@@ -23,3 +24,10 @@ def handle_project_import(sender, **kwargs):
2324
request = kwargs.get('request')
2425

2526
attach_webhook(project=project, request=request)
27+
28+
29+
# TODO: move this to ImportWizardView.trigger_initial_build
30+
# @receiver(project_import)
31+
# def trigger_initial_build(sender, request, **kwargs):
32+
# project = sender
33+
# trigger_build(project)

readthedocs/projects/views/private.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,11 @@ def done(self, form_list, **kwargs):
232232
if field in extra_fields:
233233
setattr(project, field, value)
234234
project.save()
235+
236+
# TODO: if we want to make the ``attach_webhook`` async, we need to
237+
# consider the message shown to the user when not valid webhook.
235238
project_import.send(sender=project, request=self.request)
239+
236240
self.trigger_initial_build(project)
237241
return HttpResponseRedirect(
238242
reverse('projects_detail', args=[project.slug]))

readthedocs/settings/dev.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def DATABASES(self): # noqa
3636
CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
3737
CELERY_RESULT_SERIALIZER = 'json'
3838
CELERY_ALWAYS_EAGER = True
39+
CELERY_TASK_IGNORE_RESULT = False
3940

4041
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
4142
FILE_SYNCER = 'readthedocs.builds.syncers.LocalSyncer'

0 commit comments

Comments
 (0)