Skip to content

Commit 3a95a08

Browse files
committed
Use a Celery task to re-sync RemoteRepository
1 parent 2565e27 commit 3a95a08

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

readthedocs/api/v2/views/integrations.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
build_external_version,
3131
)
3232
from readthedocs.integrations.models import HttpExchange, Integration
33-
from readthedocs.oauth.services.github import GitHubService
33+
from readthedocs.oauth.tasks import sync_remote_repositories
3434
from readthedocs.projects.models import Project, Feature
3535

3636

@@ -471,8 +471,7 @@ def handle_webhook(self):
471471
provider=GitHubProvider.id,
472472
uid=uid,
473473
)
474-
service = GitHubService(user=socialaccount.user, account=socialaccount)
475-
service.sync()
474+
sync_remote_repositories.delay(socialaccount.user.pk)
476475

477476
return None
478477

0 commit comments

Comments
 (0)