wool 0.1rc13__py3-none-any.whl → 0.1rc15__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 wool might be problematic. Click here for more details.

wool/_work.py CHANGED
@@ -30,6 +30,7 @@ from uuid import uuid4
30
30
  import cloudpickle
31
31
 
32
32
  import wool
33
+ from wool import _context as ctx
33
34
  from wool import _protobuf as pb
34
35
  from wool._typing import PassthroughDecorator
35
36
 
@@ -171,7 +172,7 @@ def _dispatch(
171
172
  tag=f"{module}.{qualname}({signature})",
172
173
  proxy=proxy,
173
174
  )
174
- return proxy.dispatch(task)
175
+ return proxy.dispatch(task, timeout=ctx.dispatch_timeout.get())
175
176
 
176
177
 
177
178
  async def _execute(fn: AsyncCallable, parent, *args, **kwargs):
@@ -187,7 +188,7 @@ async def _execute(fn: AsyncCallable, parent, *args, **kwargs):
187
188
 
188
189
  async def _stream_to_coroutine(stream):
189
190
  result = None
190
- async for result in stream:
191
+ async for result in await stream:
191
192
  continue
192
193
  return result
193
194
 
@@ -412,7 +413,7 @@ class WoolTaskEvent:
412
413
  :param type:
413
414
  The type of task event (e.g., "task-created", "task-scheduled").
414
415
  :param task:
415
- The :py:class:`WoolTask` instance associated with this event.
416
+ The :class:`WoolTask` instance associated with this event.
416
417
  """
417
418
 
418
419
  type: WoolTaskEventType
@@ -427,7 +428,7 @@ class WoolTaskEvent:
427
428
  :param type:
428
429
  The type of the task event.
429
430
  :param task:
430
- The :py:class:`WoolTask` instance associated with the event.
431
+ The :class:`WoolTask` instance associated with the event.
431
432
  """
432
433
  self.type = type
433
434
  self.task = task