Wire Celery Beat periodic sync with ingestion run tracking
This commit is contained in:
@ -67,6 +67,10 @@ def test_incremental_sync_runs_successfully(settings):
|
||||
|
||||
assert run.status == IngestionRun.RunStatus.SUCCESS
|
||||
assert run.records_processed > 0
|
||||
assert run.started_at is not None
|
||||
assert run.finished_at is not None
|
||||
assert run.finished_at >= run.started_at
|
||||
assert run.error_summary == ""
|
||||
|
||||
|
||||
@pytest.mark.django_db
|
||||
@ -80,6 +84,9 @@ def test_run_sync_handles_rate_limit(settings):
|
||||
run = IngestionRun.objects.order_by("-id").first()
|
||||
assert run is not None
|
||||
assert run.status == IngestionRun.RunStatus.FAILED
|
||||
assert run.started_at is not None
|
||||
assert run.finished_at is not None
|
||||
assert "Rate limit" in run.error_summary
|
||||
assert IngestionError.objects.filter(ingestion_run=run).exists()
|
||||
|
||||
os.environ.pop("PROVIDER_MVP_FORCE_RATE_LIMIT", None)
|
||||
|
||||
Reference in New Issue
Block a user