async-task-worker 0.4.0__tar.gz → 0.4.2__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.
- {async_task_worker-0.4.0 → async_task_worker-0.4.2}/PKG-INFO +1 -1
- {async_task_worker-0.4.0 → async_task_worker-0.4.2}/pyproject.toml +2 -2
- {async_task_worker-0.4.0 → async_task_worker-0.4.2}/src/async_task_worker/core.py +3 -3
- {async_task_worker-0.4.0 → async_task_worker-0.4.2}/uv.lock +1 -1
- {async_task_worker-0.4.0 → async_task_worker-0.4.2}/.gitignore +0 -0
- {async_task_worker-0.4.0 → async_task_worker-0.4.2}/CLAUDE.md +0 -0
- {async_task_worker-0.4.0 → async_task_worker-0.4.2}/LICENSE +0 -0
- {async_task_worker-0.4.0 → async_task_worker-0.4.2}/README.md +0 -0
- {async_task_worker-0.4.0 → async_task_worker-0.4.2}/src/async_cache/__init__.py +0 -0
- {async_task_worker-0.4.0 → async_task_worker-0.4.2}/src/async_cache/adapters/__init__.py +0 -0
- {async_task_worker-0.4.0 → async_task_worker-0.4.2}/src/async_cache/adapters/memory.py +0 -0
- {async_task_worker-0.4.0 → async_task_worker-0.4.2}/src/async_cache/adapters/redis.py +0 -0
- {async_task_worker-0.4.0 → async_task_worker-0.4.2}/src/async_cache/core.py +0 -0
- {async_task_worker-0.4.0 → async_task_worker-0.4.2}/src/async_cache/exceptions.py +0 -0
- {async_task_worker-0.4.0 → async_task_worker-0.4.2}/src/async_cache/key_utils.py +0 -0
- {async_task_worker-0.4.0 → async_task_worker-0.4.2}/src/async_cache/serialization.py +0 -0
- {async_task_worker-0.4.0 → async_task_worker-0.4.2}/src/async_events/__init__.py +0 -0
- {async_task_worker-0.4.0 → async_task_worker-0.4.2}/src/async_events/event_manager.py +0 -0
- {async_task_worker-0.4.0 → async_task_worker-0.4.2}/src/async_events/sse_client.py +0 -0
- {async_task_worker-0.4.0 → async_task_worker-0.4.2}/src/async_task_worker/__init__.py +0 -0
- {async_task_worker-0.4.0 → async_task_worker-0.4.2}/src/async_task_worker/adapters/__init__.py +0 -0
- {async_task_worker-0.4.0 → async_task_worker-0.4.2}/src/async_task_worker/adapters/cache_adapter.py +0 -0
- {async_task_worker-0.4.0 → async_task_worker-0.4.2}/src/async_task_worker/api.py +0 -0
- {async_task_worker-0.4.0 → async_task_worker-0.4.2}/src/async_task_worker/exceptions.py +0 -0
- {async_task_worker-0.4.0 → async_task_worker-0.4.2}/src/async_task_worker/executor.py +0 -0
- {async_task_worker-0.4.0 → async_task_worker-0.4.2}/src/async_task_worker/futures.py +0 -0
- {async_task_worker-0.4.0 → async_task_worker-0.4.2}/src/async_task_worker/pool.py +0 -0
- {async_task_worker-0.4.0 → async_task_worker-0.4.2}/src/async_task_worker/queue.py +0 -0
- {async_task_worker-0.4.0 → async_task_worker-0.4.2}/src/async_task_worker/registry.py +0 -0
- {async_task_worker-0.4.0 → async_task_worker-0.4.2}/src/async_task_worker/status.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "async-task-worker"
|
|
3
|
-
version = "0.4.
|
|
3
|
+
version = "0.4.2"
|
|
4
4
|
description = "Async Test Worker"
|
|
5
5
|
authors = [
|
|
6
6
|
{ name = "Ove Ranheim", email = "oranheim@gmail.com" }
|
|
@@ -50,7 +50,7 @@ requires = ["hatchling>=1.26.3"]
|
|
|
50
50
|
build-backend = "hatchling.build"
|
|
51
51
|
|
|
52
52
|
[tool.hatch.build.targets.wheel]
|
|
53
|
-
packages = ["async_events", "src/async_task_worker", "src/async_cache"]
|
|
53
|
+
packages = ["src/async_events", "src/async_task_worker", "src/async_cache"]
|
|
54
54
|
|
|
55
55
|
[tool.hatch.build]
|
|
56
56
|
exclude = [
|
|
@@ -14,7 +14,7 @@ from typing import Any, Awaitable, Callable, Dict, List, Optional, Self, TypeVar
|
|
|
14
14
|
|
|
15
15
|
from async_task_worker.adapters.cache_adapter import AsyncCacheAdapter
|
|
16
16
|
from async_task_worker.exceptions import TaskError
|
|
17
|
-
from async_task_worker.executor import TaskExecutor
|
|
17
|
+
from async_task_worker.executor import TaskExecutor, CacheManager
|
|
18
18
|
from async_task_worker.futures import TaskFutureManager
|
|
19
19
|
from async_task_worker.pool import WorkerPool
|
|
20
20
|
from async_task_worker.queue import TaskQueue
|
|
@@ -46,7 +46,7 @@ class AsyncTaskWorker:
|
|
|
46
46
|
cache_enabled: bool = False,
|
|
47
47
|
cache_ttl: Optional[int] = 3600, # 1 hour default
|
|
48
48
|
cache_max_size: Optional[int] = 1000,
|
|
49
|
-
cache_adapter: Optional[
|
|
49
|
+
cache_adapter: Optional[CacheManager] = None,
|
|
50
50
|
cache_cleanup_interval: int = 900, # 15 minutes default
|
|
51
51
|
max_queue_size: Optional[int] = None,
|
|
52
52
|
task_retention_days: Optional[int] = 7,
|
|
@@ -594,7 +594,7 @@ class AsyncTaskWorker:
|
|
|
594
594
|
logger.warning(f"Task {task_id} not found for cancellation.")
|
|
595
595
|
return False
|
|
596
596
|
|
|
597
|
-
# Store the current status for decision
|
|
597
|
+
# Store the current status for decision-making
|
|
598
598
|
task_status = task_info.status
|
|
599
599
|
|
|
600
600
|
# If task is already in a terminal state, we're done
|
|
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
|
{async_task_worker-0.4.0 → async_task_worker-0.4.2}/src/async_task_worker/adapters/__init__.py
RENAMED
|
File without changes
|
{async_task_worker-0.4.0 → async_task_worker-0.4.2}/src/async_task_worker/adapters/cache_adapter.py
RENAMED
|
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
|