Skip to content

Commit

Permalink
always be syncing
Browse files Browse the repository at this point in the history
  • Loading branch information
EDsCODE committed Nov 15, 2023
1 parent 8112ac5 commit 2a69b70
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions posthog/tasks/warehouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@


def sync_resources() -> None:
resources = ExternalDataSource.objects.filter(are_tables_created=False, status__in=["running", "error"])
resources = ExternalDataSource.objects.filter(status__in=["running", "error"])

for resource in resources:
sync_resource.delay(resource.pk)
Expand Down Expand Up @@ -83,14 +83,10 @@ def sync_resource(resource_id: str) -> None:
)
else:
table.save()

resource.are_tables_created = True
resource.status = job["status"]
resource.save()

else:
resource.status = job["status"]
resource.save()
resource.status = job["status"]
resource.save()


DEFAULT_USAGE_LIMIT = 1000000
Expand Down

0 comments on commit 2a69b70

Please sign in to comment.