Skip to content

Commit

Permalink
chore(data-warehouse): adjust time (#23267)
Browse files Browse the repository at this point in the history
adjust
  • Loading branch information
EDsCODE authored Jun 26, 2024
1 parent d4a18e8 commit 7053c11
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions posthog/tasks/scheduled.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,10 @@ def setup_periodic_tasks(sender: Celery, **kwargs: Any) -> None:
name="Invalid web replays count",
)

# Every 30 minutes try to retrieve and calculate total rows synced in period
# Every 20 minutes try to retrieve and calculate total rows synced in period

sender.add_periodic_task(
crontab(minute="*/30"),
crontab(minute="*/20"),
calculate_external_data_rows_synced.s(),
name="calculate external data rows synced",
)
4 changes: 2 additions & 2 deletions posthog/tasks/warehouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
MONTHLY_LIMIT = 500_000_000

# TODO: adjust to whenever billing officially starts
DEFAULT_DATE_TIME = datetime.datetime(2024, 7, 31, tzinfo=datetime.timezone.utc)
DEFAULT_DATE_TIME = datetime.datetime(2024, 6, 1, tzinfo=datetime.timezone.utc)


@app.task(ignore_result=True)
def capture_external_data_rows_synced() -> None:
for team in Team.objects.select_related("organization").exclude(
Q(organization__for_internal_metrics=True) | Q(is_demo=True) | Q(external_data_workspace_id__isnull=True)
Q(organization__for_internal_metrics=True) | Q(is_demo=True)
):
capture_workspace_rows_synced_by_team.delay(team.pk)

Expand Down

0 comments on commit 7053c11

Please sign in to comment.