Skip to content

Commit

Permalink
server/integrations/github: tweak sync_installed tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
frankie567 committed Oct 23, 2024
1 parent 6344a8f commit faa1ca8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions server/polar/integrations/github/service/organization.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from polar.organization.service import organization as organization_service
from polar.postgres import AsyncSession
from polar.redis import Redis
from polar.worker import QueueName, enqueue_job

from .. import client as github
from .. import types
Expand Down Expand Up @@ -244,8 +245,10 @@ async def populate_org_metadata(
async def sync_installed(self, session: AsyncSession, redis: Redis) -> None:
external_organizations = await self.list_installed(session)
for external_organization in external_organizations:
await github_repository.install_for_organization(
session, redis, external_organization
enqueue_job(
"github.repo.sync.repositories",
external_organization.id,
queue_name=QueueName.github_crawl,
)

async def _populate_github_org_metadata(
Expand Down

0 comments on commit faa1ca8

Please sign in to comment.