pydocket 0.1.3__py3-none-any.whl → 0.1.4__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.

Potentially problematic release.


This version of pydocket might be problematic. Click here for more details.

docket/docket.py CHANGED
@@ -184,12 +184,15 @@ class Docket:
184
184
  self.url,
185
185
  single_connection_client=True,
186
186
  )
187
- async with redis:
187
+ await redis.__aenter__()
188
+ try:
188
189
  yield redis
190
+ finally:
191
+ await asyncio.shield(redis.__aexit__(None, None, None))
189
192
  finally:
190
193
  # redis 4.6.0 doesn't automatically disconnect and leaves connections open
191
194
  if redis:
192
- await redis.connection_pool.disconnect()
195
+ await asyncio.shield(redis.connection_pool.disconnect())
193
196
 
194
197
  def register(self, function: Callable[..., Awaitable[Any]]) -> None:
195
198
  from .dependencies import validate_dependencies
docket/worker.py CHANGED
@@ -280,8 +280,6 @@ class Worker:
280
280
 
281
281
  for message_id, message in redeliveries:
282
282
  start_task(message_id, message)
283
- if available_slots <= 0:
284
- break
285
283
 
286
284
  if available_slots <= 0:
287
285
  continue
@@ -300,8 +298,7 @@ class Worker:
300
298
  for _, messages in new_deliveries:
301
299
  for message_id, message in messages:
302
300
  start_task(message_id, message)
303
- if available_slots <= 0:
304
- break
301
+
305
302
  except asyncio.CancelledError:
306
303
  if active_tasks: # pragma: no cover
307
304
  logger.info(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pydocket
3
- Version: 0.1.3
3
+ Version: 0.1.4
4
4
  Summary: A distributed background task system for Python functions
5
5
  Project-URL: Homepage, https://github.com/chrisguidry/docket
6
6
  Project-URL: Bug Tracker, https://github.com/chrisguidry/docket/issues
@@ -3,14 +3,14 @@ docket/__main__.py,sha256=Vkuh7aJ-Bl7QVpVbbkUksAd_hn05FiLmWbc-8kbhZQ4,34
3
3
  docket/annotations.py,sha256=GZwOPtPXyeIhnsLh3TQMBnXrjtTtSmF4Ratv4vjPx8U,950
4
4
  docket/cli.py,sha256=N0vp1zO5Wau4nBDMJOU34hYn11HR3PaYY3Ybk1gS8XY,19188
5
5
  docket/dependencies.py,sha256=Vht3qKbik-HQ7jsAU5k-eig4_yuru56-ZewjBVVu4yM,4325
6
- docket/docket.py,sha256=p0bKDkOiEWh2_L-sv1iie1Y2QVu3R7F7IU0K2AulE08,19991
6
+ docket/docket.py,sha256=TWeZ63NfN6Eq4lFzKoQTJz88ECZsH3-gqYszhQl-bXs,20124
7
7
  docket/execution.py,sha256=rHsQ60BbNREzcpUC_RvbGUctdLaprYp1x46sT6jTrdc,11416
8
8
  docket/instrumentation.py,sha256=USo8ptCFcwQj_YaUpJvsUHPb0QfQr50i9dF4tYgYde4,2992
9
9
  docket/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  docket/tasks.py,sha256=K1f_W1z4m9RVz1GJ1ymWY5ZaRmqHO1SebNBVENlkelU,1471
11
- docket/worker.py,sha256=FlBvfdaQHS-F5mtIGOLGIJsyawkjsUEu-E8bek3vCxQ,18652
12
- pydocket-0.1.3.dist-info/METADATA,sha256=i-EtdoGrCe7D105-gNAQfug1DEDrTjzIVdR78vF0njk,13092
13
- pydocket-0.1.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
14
- pydocket-0.1.3.dist-info/entry_points.txt,sha256=4WOk1nUlBsUT5O3RyMci2ImuC5XFswuopElYcLHtD5k,47
15
- pydocket-0.1.3.dist-info/licenses/LICENSE,sha256=YuVWU_ZXO0K_k2FG8xWKe5RGxV24AhJKTvQmKfqXuyk,1087
16
- pydocket-0.1.3.dist-info/RECORD,,
11
+ docket/worker.py,sha256=8wnWxHj7ctHPxEGSRxPTsHksZ6OWRoG5dKpSkvIZP88,18479
12
+ pydocket-0.1.4.dist-info/METADATA,sha256=y8PTR9Xwh8MeMr7ZhPJzUQGtQUjQXN3QRpYTvxtKfv0,13092
13
+ pydocket-0.1.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
14
+ pydocket-0.1.4.dist-info/entry_points.txt,sha256=4WOk1nUlBsUT5O3RyMci2ImuC5XFswuopElYcLHtD5k,47
15
+ pydocket-0.1.4.dist-info/licenses/LICENSE,sha256=YuVWU_ZXO0K_k2FG8xWKe5RGxV24AhJKTvQmKfqXuyk,1087
16
+ pydocket-0.1.4.dist-info/RECORD,,