From 4811dd51d38ce221bc0c71ba4ffe7cf379b98697 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Far=C3=ADas=20Santana?= Date: Wed, 20 Mar 2024 17:37:01 +0100 Subject: [PATCH] refactor: More clearly separate writer from temporary file We now should be more explicit about what is the context in which the batch export temporary file is alive. The writer outlives this context, so it can be used by callers to, for example, check how many records were written. --- posthog/temporal/batch_exports/s3_batch_export.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/posthog/temporal/batch_exports/s3_batch_export.py b/posthog/temporal/batch_exports/s3_batch_export.py index 365aa76c58e5f..2944c3d773523 100644 --- a/posthog/temporal/batch_exports/s3_batch_export.py +++ b/posthog/temporal/batch_exports/s3_batch_export.py @@ -20,8 +20,10 @@ from posthog.temporal.batch_exports.base import PostHogWorkflow from posthog.temporal.batch_exports.batch_exports import ( CreateBatchExportRunInputs, + FlushCallable, JSONLBatchExportWriter, ParquetBatchExportWriter, + UnsupportedFileFormatError, UpdateBatchExportRunStatusInputs, create_export_run, default_fields,