Skip to content

Commit

Permalink
Use for export_asset
Browse files Browse the repository at this point in the history
POSTHOG-TMV
  • Loading branch information
webjunkie committed Apr 26, 2024
1 parent 4ab4a52 commit 99d0352
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions posthog/tasks/exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from django.db import transaction

from posthog import settings
from posthog.errors import CHQueryErrorTooManySimultaneousQueries
from posthog.models import ExportedAsset
from posthog.tasks.utils import CeleryQueue

Expand Down Expand Up @@ -43,6 +44,10 @@
ignore_result=False,
time_limit=settings.ASSET_GENERATION_MAX_TIMEOUT_SECONDS,
queue=CeleryQueue.EXPORTS.value,
autoretry_for=(CHQueryErrorTooManySimultaneousQueries,),
retry_backoff=1,
retry_backoff_max=3,
max_retries=3,
)
@transaction.atomic
def export_asset(exported_asset_id: int, limit: Optional[int] = None) -> None:
Expand Down

0 comments on commit 99d0352

Please sign in to comment.