queuerPy 0.7.0__tar.gz → 0.9.0__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.
- {queuerpy-0.7.0/queuerPy.egg-info → queuerpy-0.9.0}/PKG-INFO +1 -1
- {queuerpy-0.7.0 → queuerpy-0.9.0}/_version.py +1 -1
- queuerpy-0.9.0/py.typed +1 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/pyproject.toml +20 -3
- {queuerpy-0.7.0 → queuerpy-0.9.0/queuerPy.egg-info}/PKG-INFO +1 -1
- {queuerpy-0.7.0 → queuerpy-0.9.0}/queuerPy.egg-info/SOURCES.txt +2 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/queuer_task.py +13 -4
- {queuerpy-0.7.0 → queuerpy-0.9.0}/LICENSE +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/MANIFEST.in +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/README.md +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/__init__.py +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/core/__init__.py +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/core/broadcaster.py +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/core/listener.py +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/core/retryer.py +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/core/runner.py +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/core/scheduler.py +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/core/ticker.py +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/database/__init__.py +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/database/db_job.py +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/database/db_listener.py +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/database/db_master.py +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/database/db_worker.py +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/helper/__init__.py +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/helper/database.py +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/helper/error.py +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/helper/logging.py +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/helper/sql.py +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/helper/task.py +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/model/__init__.py +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/model/batch_job.py +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/model/connection.py +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/model/job.py +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/model/master.py +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/model/options.py +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/model/options_on_error.py +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/model/task.py +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/model/worker.py +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/queuer.py +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/queuerPy.egg-info/dependency_links.txt +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/queuerPy.egg-info/requires.txt +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/queuerPy.egg-info/top_level.txt +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/queuer_global.py +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/queuer_job.py +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/queuer_listener.py +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/queuer_master.py +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/queuer_next_interval.py +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/setup.cfg +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/sql/job.sql +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/sql/master.sql +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/sql/notify.sql +0 -0
- {queuerpy-0.7.0 → queuerpy-0.9.0}/sql/worker.sql +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: queuerPy
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.0
|
|
4
4
|
Summary: A Python implementation of the queuer system - a job queuing and processing system with PostgreSQL backend
|
|
5
5
|
Author-email: Simon Herrmann <siherrmann@users.noreply.github.com>
|
|
6
6
|
Maintainer-email: Simon Herrmann <siherrmann@users.noreply.github.com>
|
queuerpy-0.9.0/py.typed
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Marker file for PEP 561 - this package supports typing
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "queuerPy"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.9.0"
|
|
8
8
|
description = "A Python implementation of the queuer system - a job queuing and processing system with PostgreSQL backend"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "Apache-2.0"
|
|
@@ -69,7 +69,7 @@ packages = ["queuerPy", "queuerPy.core", "queuerPy.database", "queuerPy.helper",
|
|
|
69
69
|
"queuerPy.sql" = "sql"
|
|
70
70
|
|
|
71
71
|
[tool.setuptools.package-data]
|
|
72
|
-
"queuerPy" = ["sql/*.sql"]
|
|
72
|
+
"queuerPy" = ["sql/*.sql", "py.typed"]
|
|
73
73
|
"*" = ["*.sql"]
|
|
74
74
|
|
|
75
75
|
[tool.pytest.ini_options]
|
|
@@ -86,4 +86,21 @@ markers = [
|
|
|
86
86
|
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
|
|
87
87
|
"integration: marks tests as integration tests"
|
|
88
88
|
]
|
|
89
|
-
asyncio_mode = "strict"
|
|
89
|
+
asyncio_mode = "strict"
|
|
90
|
+
|
|
91
|
+
[tool.pyright]
|
|
92
|
+
include = ["."]
|
|
93
|
+
exclude = ["**/__pycache__"]
|
|
94
|
+
reportMissingImports = true
|
|
95
|
+
reportMissingTypeStubs = false
|
|
96
|
+
pythonVersion = "3.8"
|
|
97
|
+
pythonPlatform = "All"
|
|
98
|
+
|
|
99
|
+
[tool.mypy]
|
|
100
|
+
python_version = "0.9.0"
|
|
101
|
+
warn_return_any = true
|
|
102
|
+
warn_unused_configs = true
|
|
103
|
+
disallow_untyped_defs = true
|
|
104
|
+
disallow_incomplete_defs = true
|
|
105
|
+
check_untyped_defs = true
|
|
106
|
+
disallow_untyped_decorators = true
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: queuerPy
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.0
|
|
4
4
|
Summary: A Python implementation of the queuer system - a job queuing and processing system with PostgreSQL backend
|
|
5
5
|
Author-email: Simon Herrmann <siherrmann@users.noreply.github.com>
|
|
6
6
|
Maintainer-email: Simon Herrmann <siherrmann@users.noreply.github.com>
|
|
@@ -3,6 +3,7 @@ MANIFEST.in
|
|
|
3
3
|
README.md
|
|
4
4
|
__init__.py
|
|
5
5
|
_version.py
|
|
6
|
+
py.typed
|
|
6
7
|
pyproject.toml
|
|
7
8
|
queuer.py
|
|
8
9
|
queuer_global.py
|
|
@@ -13,6 +14,7 @@ queuer_next_interval.py
|
|
|
13
14
|
queuer_task.py
|
|
14
15
|
./__init__.py
|
|
15
16
|
./_version.py
|
|
17
|
+
./py.typed
|
|
16
18
|
./queuer.py
|
|
17
19
|
./queuer_global.py
|
|
18
20
|
./queuer_job.py
|
|
@@ -4,7 +4,7 @@ Mirrors Go's queuerTask.go functionality.
|
|
|
4
4
|
"""
|
|
5
5
|
|
|
6
6
|
import logging
|
|
7
|
-
from typing import Any, Callable, Optional
|
|
7
|
+
from typing import Any, Callable, Optional, TypeVar, overload
|
|
8
8
|
|
|
9
9
|
from model.task import new_task, new_task_with_name
|
|
10
10
|
from model.task import Task
|
|
@@ -12,6 +12,9 @@ from queuer_global import QueuerGlobalMixin
|
|
|
12
12
|
|
|
13
13
|
logger = logging.getLogger(__name__)
|
|
14
14
|
|
|
15
|
+
# TypeVar for maintaining function type through decorator
|
|
16
|
+
F = TypeVar("F", bound=Callable[..., Any])
|
|
17
|
+
|
|
15
18
|
|
|
16
19
|
class QueuerTaskMixin(QueuerGlobalMixin):
|
|
17
20
|
"""
|
|
@@ -88,7 +91,13 @@ class QueuerTaskMixin(QueuerGlobalMixin):
|
|
|
88
91
|
logger.info(f"Task added: {new_task_obj.name}")
|
|
89
92
|
return new_task_obj
|
|
90
93
|
|
|
91
|
-
|
|
94
|
+
@overload
|
|
95
|
+
def task(self, name: None = None) -> Callable[[F], F]: ...
|
|
96
|
+
|
|
97
|
+
@overload
|
|
98
|
+
def task(self, name: str) -> Callable[[F], F]: ...
|
|
99
|
+
|
|
100
|
+
def task(self, name: Optional[str] = None) -> Callable[[F], F]:
|
|
92
101
|
"""
|
|
93
102
|
Decorator to register a task function with the queuer.
|
|
94
103
|
This is equivalent to calling add_task() or add_task_with_name().
|
|
@@ -103,10 +112,10 @@ class QueuerTaskMixin(QueuerGlobalMixin):
|
|
|
103
112
|
return param * 2
|
|
104
113
|
|
|
105
114
|
:param name: Optional custom name for the task. If not provided, uses function name.
|
|
106
|
-
:return: The decorator function
|
|
115
|
+
:return: The decorator function that preserves the original function's type
|
|
107
116
|
"""
|
|
108
117
|
|
|
109
|
-
def decorator(func:
|
|
118
|
+
def decorator(func: F) -> F:
|
|
110
119
|
if name is not None:
|
|
111
120
|
self.add_task_with_name(func, name)
|
|
112
121
|
else:
|
|
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
|