sentry-arroyo 2.19.7__py3-none-any.whl → 2.19.8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -446,10 +446,27 @@ class StreamProcessor(Generic[TStrategyPayload]):
446
446
  self.__is_paused = True
447
447
 
448
448
  elif self.__is_paused:
449
- # A paused consumer should still poll periodically to avoid it's partitions
450
- # getting revoked by the broker after reaching the max.poll.interval.ms
451
- # Polling a paused consumer should never yield a message.
452
- assert self.__consumer.poll(0.1) is None
449
+ paused_partitions = set(self.__consumer.paused())
450
+ unpaused_partitions = (
451
+ set(self.__consumer.tell()) - paused_partitions
452
+ )
453
+ if unpaused_partitions:
454
+ logger.warning(
455
+ "Processor in paused state while consumer is partially unpaused: %s, paused: %s",
456
+ unpaused_partitions,
457
+ paused_partitions,
458
+ )
459
+ self.__is_paused = False
460
+ # unpause paused partitions... just in case a subset is paused
461
+ self.__metrics_buffer.incr_counter(
462
+ "arroyo.consumer.resume", 1
463
+ )
464
+ self.__consumer.resume([*paused_partitions])
465
+ else:
466
+ # A paused consumer should still poll periodically to avoid it's partitions
467
+ # getting revoked by the broker after reaching the max.poll.interval.ms
468
+ # Polling a paused consumer should never yield a message.
469
+ assert self.__consumer.poll(0.1) is None
453
470
  else:
454
471
  time.sleep(0.01)
455
472
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sentry-arroyo
3
- Version: 2.19.7
3
+ Version: 2.19.8
4
4
  Summary: Arroyo is a Python library for working with streaming data.
5
5
  Home-page: https://github.com/getsentry/arroyo
6
6
  Author: Sentry
@@ -16,7 +16,7 @@ arroyo/backends/local/storages/__init__.py,sha256=AGYujdAAcn3osoj9jq84IzTywYbkID
16
16
  arroyo/backends/local/storages/abstract.py,sha256=1qVQp6roxHkK6XT2aklZyZk1qq7RzcPN6Db_CA5--kg,2901
17
17
  arroyo/backends/local/storages/memory.py,sha256=AoKDsVZzBXkOJyWArKWp3vfGfU9xLlKFXE9gsJiMIzQ,2613
18
18
  arroyo/processing/__init__.py,sha256=vZVg0wJvJfoVzlzGvnL59bT6YNIRJNQ5t7oU045Qbk4,87
19
- arroyo/processing/processor.py,sha256=JtBWLNrFBNG9T174VIXHHW02gK5YJaJt4f5XoNDd_lU,19010
19
+ arroyo/processing/processor.py,sha256=GCSFF6ELghzn8qCOcBet8FevFn0nVpD0Ww9ufVdfFNI,19991
20
20
  arroyo/processing/strategies/__init__.py,sha256=EU_JMb54eOxMxaC5mIFpI-sAF-X2ZScbE8czBZ7bQkY,1106
21
21
  arroyo/processing/strategies/abstract.py,sha256=nu7juEz_aQmQIH35Z8u--FBuLjkK8_LQ1hIG2xpw9AA,4808
22
22
  arroyo/processing/strategies/batching.py,sha256=s89xC6lQpBseEaApu1iNTipXGKeO95OMwinj2VBKn9s,4778
@@ -71,8 +71,8 @@ tests/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
71
71
  tests/utils/test_concurrent.py,sha256=Gwdzym2UZ1HO3rhOSGmzxImWcLFygY8P7MXHT3Q0xTE,455
72
72
  tests/utils/test_metrics.py,sha256=bI0EtGgPokMQyEqX58i0-8zvLfxRP2nWaWr2wLMaJ_o,917
73
73
  tests/utils/test_retries.py,sha256=AxJLkXWeL9AjHv_p1n0pe8CXXJp24ZQIuYBHfNcmiz4,3075
74
- sentry_arroyo-2.19.7.dist-info/LICENSE,sha256=0Ng3MFdEcnz0sVD1XvGBBzbavvNp_7OAM5yVObB46jU,10829
75
- sentry_arroyo-2.19.7.dist-info/METADATA,sha256=-NLUjXgKgabXzEOBUpgYTxnkme0tmeEBF0OvDuGOqas,1989
76
- sentry_arroyo-2.19.7.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
77
- sentry_arroyo-2.19.7.dist-info/top_level.txt,sha256=DVdMZKysL_iIxm5aY0sYgZtP5ZXMg9YBaBmGQHVmDXA,22
78
- sentry_arroyo-2.19.7.dist-info/RECORD,,
74
+ sentry_arroyo-2.19.8.dist-info/LICENSE,sha256=0Ng3MFdEcnz0sVD1XvGBBzbavvNp_7OAM5yVObB46jU,10829
75
+ sentry_arroyo-2.19.8.dist-info/METADATA,sha256=SQ3nCTKqHNR234jIl_Beqo1Xtifeuvta0T_XSk_HOp4,1989
76
+ sentry_arroyo-2.19.8.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
77
+ sentry_arroyo-2.19.8.dist-info/top_level.txt,sha256=DVdMZKysL_iIxm5aY0sYgZtP5ZXMg9YBaBmGQHVmDXA,22
78
+ sentry_arroyo-2.19.8.dist-info/RECORD,,