Skip to content

Commit a4d853b

Browse files
author
maxi297
committed
Fix logging
1 parent 9064376 commit a4d853b

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

airbyte_cdk/sources/declarative/incremental/concurrent_partition_cursor.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -281,12 +281,10 @@ def _generate_slices_from_partition(
281281
self._number_of_partitions += 1
282282
self._cursor_per_partition[partition_key] = cursor
283283

284-
if (
285-
not self._IS_PARTITION_DUPLICATION_LOGGED
286-
and partition_key in self._semaphore_per_partition
287-
):
288-
logger.warning(f"Partition duplication detected for stream {self._stream_name}")
289-
self._IS_PARTITION_DUPLICATION_LOGGED = True
284+
if partition_key in self._semaphore_per_partition:
285+
if not self._IS_PARTITION_DUPLICATION_LOGGED:
286+
logger.warning(f"Partition duplication detected for stream {self._stream_name}")
287+
self._IS_PARTITION_DUPLICATION_LOGGED = True
290288
else:
291289
self._semaphore_per_partition[partition_key] = threading.Semaphore(0)
292290

0 commit comments

Comments
 (0)