buz 2.13.1rc5__py3-none-any.whl → 2.13.1rc6__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.
@@ -1,10 +1,10 @@
1
1
  from abc import abstractmethod
2
2
  import traceback
3
- from asyncio import Lock, create_task, gather, Semaphore, Event as AsyncIOEvent, sleep
3
+ from asyncio import Lock, Task, create_task, gather, Semaphore, Event as AsyncIOEvent, sleep
4
4
  from datetime import timedelta, datetime
5
5
  from itertools import cycle
6
6
  from logging import Logger
7
- from typing import AsyncIterator, Coroutine, Optional, Sequence, Type, TypeVar
7
+ from typing import AsyncIterator, Optional, Sequence, Type, TypeVar
8
8
 
9
9
  from aiokafka import TopicPartition
10
10
  from aiokafka.coordinator.assignors.abstract import AbstractPartitionAssignor
@@ -119,8 +119,8 @@ class BaseBuzAIOKafkaAsyncConsumer(AsyncConsumer):
119
119
  raise WorkerExecutionException("The worker was closed by an unexpected exception")
120
120
 
121
121
  async def __run_worker(self) -> tuple[Optional[Exception], Optional[Exception]]:
122
- consume_events_task = self.__consume_events_task()
123
- polling_task = self.__polling_task()
122
+ consume_events_task = create_task(self.__consume_events_task())
123
+ polling_task = create_task(self.__polling_task())
124
124
 
125
125
  try:
126
126
  await gather(consume_events_task, polling_task)
@@ -131,7 +131,7 @@ class BaseBuzAIOKafkaAsyncConsumer(AsyncConsumer):
131
131
  polling_task_exception = await self.__await_exception(polling_task)
132
132
  return (consume_events_exception, polling_task_exception)
133
133
 
134
- async def __await_exception(self, future: Coroutine) -> Optional[Exception]:
134
+ async def __await_exception(self, future: Task) -> Optional[Exception]:
135
135
  try:
136
136
  await future
137
137
  return None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: buz
3
- Version: 2.13.1rc5
3
+ Version: 2.13.1rc6
4
4
  Summary: Buz is a set of light, simple and extensible implementations of event, command and query buses.
5
5
  License: MIT
6
6
  Author: Luis Pintado Lozano
@@ -45,7 +45,7 @@ buz/event/exceptions/term_signal_interruption_exception.py,sha256=RkRRF0v_K9Hg48
45
45
  buz/event/exceptions/worker_execution_exception.py,sha256=6mgztvXOCG_9VZ_Jptkk72kZtNWQ2CPuQ3TjXEWFE14,123
46
46
  buz/event/infrastructure/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
47
47
  buz/event/infrastructure/buz_kafka/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
48
- buz/event/infrastructure/buz_kafka/base_buz_aiokafka_async_consumer.py,sha256=fFIifDvecAyglL81vWPZ8IXZE0RxvKDd6pq6cJYezJI,14625
48
+ buz/event/infrastructure/buz_kafka/base_buz_aiokafka_async_consumer.py,sha256=75I_wUUuQXAneEKYGjnboRHWwSYJ4UADSpcG-gnClSo,14641
49
49
  buz/event/infrastructure/buz_kafka/buz_aiokafka_async_consumer.py,sha256=dqQDv7taAmINE9G2geMDExbcvSlntP09_rQ0JRbc4Rw,5507
50
50
  buz/event/infrastructure/buz_kafka/buz_aiokafka_multi_threaded_consumer.py,sha256=yrEU51OBjvLjCfYJFJPxux1bcIhoTVMw1Jf0HJMWbb0,5449
51
51
  buz/event/infrastructure/buz_kafka/buz_kafka_event_bus.py,sha256=f94fmS4AVfb3LQsp49e-4Cqzj00IqxHDzuUvDbN4u2s,4258
@@ -230,7 +230,7 @@ buz/serializer/message_to_json_bytes_serializer.py,sha256=RGZJ64t4t4Pz2FCASZZCv-
230
230
  buz/wrapper/__init__.py,sha256=GnRdJFcncn-qp0hzDG9dBHLmTJSbHFVjE_yr-MdW_n4,77
231
231
  buz/wrapper/async_to_sync.py,sha256=OfK-vrVUhuN-LLLvekLdMbQYtH0ue5lfbvuasj6ovMI,698
232
232
  buz/wrapper/event_loop.py,sha256=pfBJ1g-8A2a3YgW8Gf9Fg0kkewoh3-wgTy2KIFDyfHk,266
233
- buz-2.13.1rc5.dist-info/LICENSE,sha256=Jytu2S-2SPEgsB0y6BF-_LUxIWY7402fl0JSh36TLZE,1062
234
- buz-2.13.1rc5.dist-info/METADATA,sha256=HD-JfQW8fjPkxB_hB-bv07tM8IQUtPwhZEPsWFD-TcQ,1620
235
- buz-2.13.1rc5.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
236
- buz-2.13.1rc5.dist-info/RECORD,,
233
+ buz-2.13.1rc6.dist-info/LICENSE,sha256=Jytu2S-2SPEgsB0y6BF-_LUxIWY7402fl0JSh36TLZE,1062
234
+ buz-2.13.1rc6.dist-info/METADATA,sha256=bE9USoD5Gh7NRbTZIClXx8Zvqi482Z6Y_AER8JhHeMM,1620
235
+ buz-2.13.1rc6.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
236
+ buz-2.13.1rc6.dist-info/RECORD,,