Skip to content

Commit

Permalink
Use a Celery task to re-sync RemoteRepository
Browse files Browse the repository at this point in the history
  • Loading branch information
humitos committed Oct 20, 2021
1 parent 2565e27 commit 3a95a08
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions readthedocs/api/v2/views/integrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
build_external_version,
)
from readthedocs.integrations.models import HttpExchange, Integration
from readthedocs.oauth.services.github import GitHubService
from readthedocs.oauth.tasks import sync_remote_repositories
from readthedocs.projects.models import Project, Feature


Expand Down Expand Up @@ -471,8 +471,7 @@ def handle_webhook(self):
provider=GitHubProvider.id,
uid=uid,
)
service = GitHubService(user=socialaccount.user, account=socialaccount)
service.sync()
sync_remote_repositories.delay(socialaccount.user.pk)

return None

Expand Down

0 comments on commit 3a95a08

Please sign in to comment.