Skip to content

Commit 9b7cf1f

Browse files
committed
Fix missing sync repo task
This was not caught on celery 4 upgrade
1 parent 1e55dff commit 9b7cf1f

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

readthedocs/oauth/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
default_app_config = 'readthedocs.oauth.apps.OAuthConfig'

readthedocs/oauth/tasks.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
@permission_check(user_id_matches)
1313
class SyncRemoteRepositories(PublicTask):
14+
15+
name = __name__ + '.sync_remote_repositories'
1416
public_name = 'sync_remote_repositories'
1517
queue = 'web'
1618

readthedocs/restapi/views/task_views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def job_status(request, task_id):
5353
@decorators.permission_classes((permissions.IsAuthenticated,))
5454
@decorators.renderer_classes((JSONRenderer,))
5555
def sync_remote_repositories(request):
56-
result = tasks.sync_remote_repositories.delay(
56+
result = tasks.SyncRemoteRepositories().delay(
5757
user_id=request.user.id)
5858
task_id = result.task_id
5959
return Response({

0 commit comments

Comments
 (0)