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 21, 2021
1 parent 97495ba commit f143538
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions readthedocs/api/v2/views/integrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
trigger_sync_versions,
)
from readthedocs.integrations.models import HttpExchange, Integration
from readthedocs.projects.models import Feature, Project
from readthedocs.oauth.tasks import sync_remote_repositories
from readthedocs.projects.models import Project, Feature

log = logging.getLogger(__name__)

Expand Down Expand Up @@ -463,8 +464,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 f143538

Please sign in to comment.