From 300193cef5563163cbb476e5fa5cd8dda683de0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Far=C3=ADas=20Santana?= Date: Thu, 28 Sep 2023 15:22:27 +0200 Subject: [PATCH] fix: Bump timeout but reduce heartbeat timeout (#17670) --- posthog/api/test/__snapshots__/test_person.ambr | 12 ++++++------ posthog/temporal/workflows/s3_batch_export.py | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/posthog/api/test/__snapshots__/test_person.ambr b/posthog/api/test/__snapshots__/test_person.ambr index d07db1bfe1932..fbd43b185c95a 100644 --- a/posthog/api/test/__snapshots__/test_person.ambr +++ b/posthog/api/test/__snapshots__/test_person.ambr @@ -1252,8 +1252,8 @@ (SELECT id FROM person WHERE team_id = 2 - AND ((replaceRegexpAll(JSONExtractRaw(properties, 'email'), '^"|"$', '') ILIKE '%00000000-0000-4000-8000-000000000001%') - OR (id = '00000000-0000-4000-8000-000000000001' + AND ((replaceRegexpAll(JSONExtractRaw(properties, 'email'), '^"|"$', '') ILIKE '%00000000-0000-4000-8000-000000000000%') + OR (id = '00000000-0000-4000-8000-000000000000' OR id IN (SELECT person_id FROM @@ -1263,12 +1263,12 @@ WHERE team_id = 2 GROUP BY distinct_id HAVING argMax(is_deleted, version) = 0) - WHERE distinct_id = '00000000-0000-4000-8000-000000000001' ))) ) + WHERE distinct_id = '00000000-0000-4000-8000-000000000000' ))) ) GROUP BY id HAVING max(is_deleted) = 0 AND argMax(person.created_at, version) < now() + INTERVAL 1 DAY - AND ((replaceRegexpAll(JSONExtractRaw(argMax(person.properties, version), 'email'), '^"|"$', '') ILIKE '%00000000-0000-4000-8000-000000000001%') - OR (id = '00000000-0000-4000-8000-000000000001' + AND ((replaceRegexpAll(JSONExtractRaw(argMax(person.properties, version), 'email'), '^"|"$', '') ILIKE '%00000000-0000-4000-8000-000000000000%') + OR (id = '00000000-0000-4000-8000-000000000000' OR id IN (SELECT person_id FROM @@ -1278,7 +1278,7 @@ WHERE team_id = 2 GROUP BY distinct_id HAVING argMax(is_deleted, version) = 0) - WHERE distinct_id = '00000000-0000-4000-8000-000000000001' ))) + WHERE distinct_id = '00000000-0000-4000-8000-000000000000' ))) ORDER BY argMax(person.created_at, version) DESC, id DESC LIMIT 100) person LEFT JOIN diff --git a/posthog/temporal/workflows/s3_batch_export.py b/posthog/temporal/workflows/s3_batch_export.py index ef707f1604a6d..4252614a0263f 100644 --- a/posthog/temporal/workflows/s3_batch_export.py +++ b/posthog/temporal/workflows/s3_batch_export.py @@ -471,8 +471,8 @@ async def run(self, inputs: S3BatchExportInputs): await workflow.execute_activity( insert_into_s3_activity, insert_inputs, - start_to_close_timeout=dt.timedelta(minutes=10), - heartbeat_timeout=dt.timedelta(minutes=10), + start_to_close_timeout=dt.timedelta(minutes=20), + heartbeat_timeout=dt.timedelta(minutes=2), retry_policy=RetryPolicy( initial_interval=dt.timedelta(seconds=10), maximum_interval=dt.timedelta(seconds=120),