ez-a-sync 0.24.47__tar.gz → 0.24.49__tar.gz
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 ez-a-sync might be problematic. Click here for more details.
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/PKG-INFO +1 -1
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/primitives/queue.py +33 -35
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/ez_a_sync.egg-info/PKG-INFO +1 -1
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/.coverage +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/.github/workflows/black.yaml +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/.github/workflows/codeql.yaml +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/.github/workflows/docs.yaml +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/.github/workflows/mypy.yaml +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/.github/workflows/pytest.yaml +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/.github/workflows/release.yaml +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/.gitignore +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/.sourcery.yaml +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/LICENSE.txt +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/MANIFEST.in +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/Makefile +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/README.md +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/TODO +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/ENVIRONMENT_VARIABLES.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/__init__.pxd +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/__init__.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/_smart.c +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/_smart.pyx +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/_typing.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/__init__.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/_descriptor.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/_flags.c +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/_flags.pxd +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/_flags.pyx +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/_helpers.c +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/_helpers.pxd +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/_helpers.pyi +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/_helpers.pyx +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/_kwargs.c +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/_kwargs.pxd +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/_kwargs.pyx +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/_meta.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/abstract.c +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/abstract.pyi +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/abstract.pyx +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/base.c +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/base.pyi +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/base.pyx +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/config.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/decorator.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/flags.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/function.c +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/function.pyi +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/function.pyx +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/method.c +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/method.pxd +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/method.pyi +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/method.pyx +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/modifiers/__init__.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/modifiers/cache/__init__.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/modifiers/cache/memory.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/modifiers/limiter.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/modifiers/manager.c +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/modifiers/manager.pyi +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/modifiers/manager.pyx +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/modifiers/semaphores.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/property.c +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/property.pyi +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/property.pyx +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/a_sync/singleton.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/aliases.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/asyncio/__init__.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/asyncio/as_completed.c +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/asyncio/as_completed.pxd +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/asyncio/as_completed.pyi +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/asyncio/as_completed.pyx +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/asyncio/create_task.c +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/asyncio/create_task.pxd +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/asyncio/create_task.pyi +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/asyncio/create_task.pyx +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/asyncio/gather.c +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/asyncio/gather.pyi +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/asyncio/gather.pyx +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/exceptions.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/executor.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/future.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/iter.c +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/iter.pyi +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/iter.pyx +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/primitives/__init__.pxd +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/primitives/__init__.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/primitives/_debug.c +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/primitives/_debug.pxd +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/primitives/_debug.pyi +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/primitives/_debug.pyx +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/primitives/_loggable.c +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/primitives/_loggable.pxd +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/primitives/_loggable.pyi +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/primitives/_loggable.pyx +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/primitives/locks/__init__.pxd +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/primitives/locks/__init__.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/primitives/locks/counter.c +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/primitives/locks/counter.pxd +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/primitives/locks/counter.pyi +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/primitives/locks/counter.pyx +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/primitives/locks/event.c +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/primitives/locks/event.pxd +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/primitives/locks/event.pyi +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/primitives/locks/event.pyx +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/primitives/locks/prio_semaphore.c +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/primitives/locks/prio_semaphore.pxd +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/primitives/locks/prio_semaphore.pyi +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/primitives/locks/prio_semaphore.pyx +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/primitives/locks/semaphore.c +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/primitives/locks/semaphore.pxd +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/primitives/locks/semaphore.pyi +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/primitives/locks/semaphore.pyx +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/py.typed +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/sphinx/__init__.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/sphinx/ext.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/task.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/utils/__init__.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/a_sync/utils/iterators.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/docs/Makefile +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/docs/_build/html/_static/alabaster.css +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/docs/_build/html/_static/basic.css +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/docs/_build/html/_static/custom.css +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/docs/_build/html/_static/doctools.js +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/docs/_build/html/_static/documentation_options.js +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/docs/_build/html/_static/file.png +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/docs/_build/html/_static/language_data.js +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/docs/_build/html/_static/minus.png +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/docs/_build/html/_static/plus.png +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/docs/_build/html/_static/pygments.css +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/docs/_build/html/_static/searchtools.js +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/docs/_build/html/_static/sphinx_highlight.js +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/docs/conf.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/docs/index.rst +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/docs/make.bat +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/ez_a_sync.egg-info/SOURCES.txt +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/ez_a_sync.egg-info/dependency_links.txt +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/ez_a_sync.egg-info/not-zip-safe +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/ez_a_sync.egg-info/requires.txt +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/ez_a_sync.egg-info/top_level.txt +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/pyproject.toml +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/requirements-dev.txt +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/requirements.txt +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/setup.cfg +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/setup.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/tests/__init__.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/tests/a_sync/modifiers/test_apply_semaphore.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/tests/a_sync/test_abstract.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/tests/a_sync/test_base.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/tests/a_sync/test_cache.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/tests/a_sync/test_decorator.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/tests/a_sync/test_limiter.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/tests/a_sync/test_meta.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/tests/a_sync/test_modified.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/tests/a_sync/test_singleton.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/tests/asyncio/test_as_completed.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/tests/asyncio/test_create_task.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/tests/asyncio/test_gather.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/tests/conftest.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/tests/executor.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/tests/fixtures.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/tests/primitives/test_counter.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/tests/primitives/test_event.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/tests/primitives/test_prio_semaphore.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/tests/primitives/test_queue.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/tests/primitives/test_semaphore.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/tests/task/test_task.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/tests/task/test_task_mapping_views.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/tests/test_executor.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/tests/test_future.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/tests/test_helpers.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/tests/test_iter.py +0 -0
- {ez_a_sync-0.24.47 → ez_a_sync-0.24.49}/tests/test_smart.py +0 -0
|
@@ -283,7 +283,7 @@ class ProcessingQueue(_Queue[Tuple[P, "asyncio.Future[V]"]], Generic[P, V]):
|
|
|
283
283
|
_closed: bool = False
|
|
284
284
|
"""Indicates whether the queue is closed."""
|
|
285
285
|
|
|
286
|
-
__slots__ = "func", "num_workers"
|
|
286
|
+
__slots__ = "func", "num_workers"
|
|
287
287
|
|
|
288
288
|
def __init__(
|
|
289
289
|
self,
|
|
@@ -328,13 +328,6 @@ class ProcessingQueue(_Queue[Tuple[P, "asyncio.Future[V]"]], Generic[P, V]):
|
|
|
328
328
|
self._no_futs = not return_data
|
|
329
329
|
"""Indicates whether tasks will return data via futures."""
|
|
330
330
|
|
|
331
|
-
@wraps(func)
|
|
332
|
-
async def _worker_coro() -> NoReturn:
|
|
333
|
-
"""Worker coroutine for processing tasks."""
|
|
334
|
-
return await self.__worker_coro()
|
|
335
|
-
|
|
336
|
-
self._worker_coro = _worker_coro
|
|
337
|
-
|
|
338
331
|
# NOTE: asyncio defines both this and __str__
|
|
339
332
|
def __repr__(self) -> str:
|
|
340
333
|
"""
|
|
@@ -494,7 +487,7 @@ class ProcessingQueue(_Queue[Tuple[P, "asyncio.Future[V]"]], Generic[P, V]):
|
|
|
494
487
|
return task
|
|
495
488
|
|
|
496
489
|
@log_broken
|
|
497
|
-
async def
|
|
490
|
+
async def _worker_coro(self) -> NoReturn:
|
|
498
491
|
"""
|
|
499
492
|
The coroutine executed by worker tasks to process the queue.
|
|
500
493
|
"""
|
|
@@ -898,8 +891,7 @@ class SmartProcessingQueue(_VariablePriorityQueueMixin[T], ProcessingQueue[Conca
|
|
|
898
891
|
fut, args, kwargs = super()._get()
|
|
899
892
|
return args, kwargs, fut()
|
|
900
893
|
|
|
901
|
-
|
|
902
|
-
async def __worker_coro(self) -> NoReturn:
|
|
894
|
+
async def _worker_coro(self) -> NoReturn:
|
|
903
895
|
"""
|
|
904
896
|
Worker coroutine responsible for processing tasks in the queue.
|
|
905
897
|
|
|
@@ -909,7 +901,7 @@ class SmartProcessingQueue(_VariablePriorityQueueMixin[T], ProcessingQueue[Conca
|
|
|
909
901
|
Any: Exceptions raised during task processing are logged.
|
|
910
902
|
|
|
911
903
|
Example:
|
|
912
|
-
>>> await queue.
|
|
904
|
+
>>> await queue._worker_coro()
|
|
913
905
|
"""
|
|
914
906
|
get_next_job = self.get
|
|
915
907
|
func = self.func
|
|
@@ -919,32 +911,38 @@ class SmartProcessingQueue(_VariablePriorityQueueMixin[T], ProcessingQueue[Conca
|
|
|
919
911
|
args: P.args
|
|
920
912
|
kwargs: P.kwargs
|
|
921
913
|
fut: SmartFuture[V]
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
args, kwargs, fut = await get_next_job()
|
|
925
|
-
if fut is None:
|
|
926
|
-
# the weakref was already cleaned up, we don't need to process this item
|
|
927
|
-
task_done()
|
|
928
|
-
continue
|
|
929
|
-
log_debug("processing %s", fut)
|
|
930
|
-
result = await func(*args, **kwargs)
|
|
931
|
-
fut.set_result(result)
|
|
932
|
-
except InvalidStateError:
|
|
933
|
-
logger.error(
|
|
934
|
-
"cannot set result for %s %s: %s",
|
|
935
|
-
func.__name__,
|
|
936
|
-
fut,
|
|
937
|
-
result,
|
|
938
|
-
)
|
|
939
|
-
except Exception as e:
|
|
940
|
-
log_debug("%s: %s", type(e).__name__, e)
|
|
914
|
+
try:
|
|
915
|
+
while True:
|
|
941
916
|
try:
|
|
942
|
-
fut
|
|
917
|
+
args, kwargs, fut = await get_next_job()
|
|
918
|
+
if fut is None:
|
|
919
|
+
# the weakref was already cleaned up, we don't need to process this item
|
|
920
|
+
task_done()
|
|
921
|
+
continue
|
|
922
|
+
log_debug("processing %s", fut)
|
|
923
|
+
result = await func(*args, **kwargs)
|
|
924
|
+
fut.set_result(result)
|
|
943
925
|
except InvalidStateError:
|
|
944
926
|
logger.error(
|
|
945
|
-
"cannot set
|
|
927
|
+
"cannot set result for %s %s: %s",
|
|
946
928
|
func.__name__,
|
|
947
929
|
fut,
|
|
948
|
-
|
|
930
|
+
result,
|
|
949
931
|
)
|
|
950
|
-
|
|
932
|
+
except Exception as e:
|
|
933
|
+
log_debug("%s: %s", type(e).__name__, e)
|
|
934
|
+
try:
|
|
935
|
+
fut.set_exception(e)
|
|
936
|
+
except InvalidStateError:
|
|
937
|
+
logger.error(
|
|
938
|
+
"cannot set exception for %s %s: %s",
|
|
939
|
+
func.__name__,
|
|
940
|
+
fut,
|
|
941
|
+
e,
|
|
942
|
+
)
|
|
943
|
+
task_done()
|
|
944
|
+
|
|
945
|
+
except Exception as e:
|
|
946
|
+
logger.error("%s is broken!!!", self)
|
|
947
|
+
logger.exception(e)
|
|
948
|
+
raise
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|