queuerPy 0.10.0__tar.gz → 0.11.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.10.0/queuerPy.egg-info → queuerpy-0.11.0}/PKG-INFO +1 -1
- {queuerpy-0.10.0 → queuerpy-0.11.0}/__init__.py +8 -16
- {queuerpy-0.10.0 → queuerpy-0.11.0}/_version.py +1 -1
- {queuerpy-0.10.0 → queuerpy-0.11.0}/core/listener.py +2 -2
- {queuerpy-0.10.0 → queuerpy-0.11.0}/core/retryer.py +1 -6
- {queuerpy-0.10.0 → queuerpy-0.11.0}/core/runner.py +1 -1
- {queuerpy-0.10.0 → queuerpy-0.11.0}/core/scheduler.py +3 -3
- {queuerpy-0.10.0 → queuerpy-0.11.0}/core/ticker.py +2 -2
- {queuerpy-0.10.0 → queuerpy-0.11.0}/database/__init__.py +4 -5
- {queuerpy-0.10.0 → queuerpy-0.11.0}/database/db_job.py +5 -5
- {queuerpy-0.10.0 → queuerpy-0.11.0}/database/db_listener.py +2 -2
- {queuerpy-0.10.0 → queuerpy-0.11.0}/database/db_master.py +4 -4
- {queuerpy-0.10.0 → queuerpy-0.11.0}/database/db_worker.py +4 -4
- {queuerpy-0.10.0 → queuerpy-0.11.0}/helper/database.py +1 -2
- {queuerpy-0.10.0 → queuerpy-0.11.0}/helper/error.py +2 -1
- {queuerpy-0.10.0 → queuerpy-0.11.0}/helper/sql.py +1 -1
- {queuerpy-0.10.0 → queuerpy-0.11.0}/model/job.py +1 -1
- {queuerpy-0.10.0 → queuerpy-0.11.0}/model/options.py +1 -0
- {queuerpy-0.10.0 → queuerpy-0.11.0}/model/task.py +1 -1
- {queuerpy-0.10.0 → queuerpy-0.11.0}/model/worker.py +1 -0
- {queuerpy-0.10.0 → queuerpy-0.11.0}/pyproject.toml +4 -9
- {queuerpy-0.10.0 → queuerpy-0.11.0}/queuer.py +14 -14
- {queuerpy-0.10.0 → queuerpy-0.11.0/queuerPy.egg-info}/PKG-INFO +1 -1
- {queuerpy-0.10.0 → queuerpy-0.11.0}/queuerPy.egg-info/SOURCES.txt +27 -0
- {queuerpy-0.10.0 → queuerpy-0.11.0}/queuer_global.py +11 -10
- {queuerpy-0.10.0 → queuerpy-0.11.0}/queuer_job.py +11 -11
- {queuerpy-0.10.0 → queuerpy-0.11.0}/queuer_listener.py +2 -2
- {queuerpy-0.10.0 → queuerpy-0.11.0}/queuer_master.py +6 -6
- {queuerpy-0.10.0 → queuerpy-0.11.0}/queuer_next_interval.py +3 -6
- {queuerpy-0.10.0 → queuerpy-0.11.0}/queuer_task.py +3 -3
- {queuerpy-0.10.0 → queuerpy-0.11.0}/LICENSE +0 -0
- {queuerpy-0.10.0 → queuerpy-0.11.0}/MANIFEST.in +0 -0
- {queuerpy-0.10.0 → queuerpy-0.11.0}/README.md +0 -0
- {queuerpy-0.10.0 → queuerpy-0.11.0}/core/__init__.py +0 -0
- {queuerpy-0.10.0 → queuerpy-0.11.0}/core/broadcaster.py +0 -0
- {queuerpy-0.10.0 → queuerpy-0.11.0}/helper/__init__.py +0 -0
- {queuerpy-0.10.0 → queuerpy-0.11.0}/helper/logging.py +0 -0
- {queuerpy-0.10.0 → queuerpy-0.11.0}/helper/task.py +0 -0
- {queuerpy-0.10.0 → queuerpy-0.11.0}/model/__init__.py +0 -0
- {queuerpy-0.10.0 → queuerpy-0.11.0}/model/batch_job.py +0 -0
- {queuerpy-0.10.0 → queuerpy-0.11.0}/model/connection.py +0 -0
- {queuerpy-0.10.0 → queuerpy-0.11.0}/model/master.py +0 -0
- {queuerpy-0.10.0 → queuerpy-0.11.0}/model/options_on_error.py +0 -0
- {queuerpy-0.10.0 → queuerpy-0.11.0}/py.typed +0 -0
- {queuerpy-0.10.0 → queuerpy-0.11.0}/queuerPy.egg-info/dependency_links.txt +0 -0
- {queuerpy-0.10.0 → queuerpy-0.11.0}/queuerPy.egg-info/requires.txt +0 -0
- {queuerpy-0.10.0 → queuerpy-0.11.0}/queuerPy.egg-info/top_level.txt +0 -0
- {queuerpy-0.10.0 → queuerpy-0.11.0}/setup.cfg +0 -0
- {queuerpy-0.10.0 → queuerpy-0.11.0}/sql/job.sql +0 -0
- {queuerpy-0.10.0 → queuerpy-0.11.0}/sql/master.sql +0 -0
- {queuerpy-0.10.0 → queuerpy-0.11.0}/sql/notify.sql +0 -0
- {queuerpy-0.10.0 → queuerpy-0.11.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.11.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>
|
|
@@ -10,50 +10,42 @@ A job queuing and processing system with PostgreSQL backend that provides:
|
|
|
10
10
|
- Event-driven notifications
|
|
11
11
|
"""
|
|
12
12
|
|
|
13
|
-
import
|
|
14
|
-
import os
|
|
15
|
-
|
|
16
|
-
# Add the package directory to Python path to enable direct imports
|
|
17
|
-
_package_dir = os.path.dirname(__file__)
|
|
18
|
-
if _package_dir not in sys.path:
|
|
19
|
-
sys.path.insert(0, _package_dir)
|
|
20
|
-
|
|
21
|
-
from _version import __version__
|
|
13
|
+
from ._version import __version__
|
|
22
14
|
|
|
23
15
|
__author__ = "Simon Herrmann"
|
|
24
16
|
__email__ = "siherrmann@users.noreply.github.com"
|
|
25
17
|
|
|
26
18
|
# Core exports
|
|
27
|
-
from queuer import (
|
|
19
|
+
from .queuer import (
|
|
28
20
|
Queuer,
|
|
29
21
|
new_queuer,
|
|
30
22
|
new_queuer_with_db,
|
|
31
23
|
)
|
|
32
24
|
|
|
33
|
-
from helper.database import (
|
|
25
|
+
from .helper.database import (
|
|
34
26
|
DatabaseConfiguration,
|
|
35
27
|
)
|
|
36
28
|
|
|
37
|
-
from model.job import (
|
|
29
|
+
from .model.job import (
|
|
38
30
|
Job,
|
|
39
31
|
JobStatus,
|
|
40
32
|
)
|
|
41
33
|
|
|
42
|
-
from model.worker import (
|
|
34
|
+
from .model.worker import (
|
|
43
35
|
Worker,
|
|
44
36
|
WorkerStatus,
|
|
45
37
|
)
|
|
46
38
|
|
|
47
|
-
from model.master import (
|
|
39
|
+
from .model.master import (
|
|
48
40
|
Master,
|
|
49
41
|
)
|
|
50
42
|
|
|
51
|
-
from model.options_on_error import (
|
|
43
|
+
from .model.options_on_error import (
|
|
52
44
|
OnError,
|
|
53
45
|
RetryBackoff,
|
|
54
46
|
)
|
|
55
47
|
|
|
56
|
-
from helper.error import (
|
|
48
|
+
from .helper.error import (
|
|
57
49
|
QueuerError,
|
|
58
50
|
)
|
|
59
51
|
|
|
@@ -9,8 +9,8 @@ import asyncio
|
|
|
9
9
|
import threading
|
|
10
10
|
from typing import TypeVar, Generic, Callable, Optional, Any
|
|
11
11
|
|
|
12
|
-
from
|
|
13
|
-
from
|
|
12
|
+
from .broadcaster import Broadcaster
|
|
13
|
+
from .runner import go_func
|
|
14
14
|
|
|
15
15
|
T = TypeVar("T")
|
|
16
16
|
|
|
@@ -6,16 +6,11 @@ for reliable task execution with various backoff strategies.
|
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
8
|
import logging
|
|
9
|
-
import sys
|
|
10
|
-
import os
|
|
11
9
|
import asyncio
|
|
12
10
|
import inspect
|
|
13
11
|
from typing import Any, Callable, Optional
|
|
14
12
|
|
|
15
|
-
|
|
16
|
-
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
|
17
|
-
|
|
18
|
-
from model.options_on_error import OnError, RetryBackoff
|
|
13
|
+
from ..model.options_on_error import OnError, RetryBackoff
|
|
19
14
|
|
|
20
15
|
|
|
21
16
|
# Configure logging
|
|
@@ -6,9 +6,9 @@ import time
|
|
|
6
6
|
from datetime import datetime
|
|
7
7
|
from typing import Callable, Dict, Optional, Any, Tuple
|
|
8
8
|
|
|
9
|
-
from
|
|
10
|
-
from helper.logging import get_logger
|
|
11
|
-
from helper.task import check_valid_task_with_parameters
|
|
9
|
+
from .runner import go_func
|
|
10
|
+
from ..helper.logging import get_logger
|
|
11
|
+
from ..helper.task import check_valid_task_with_parameters
|
|
12
12
|
|
|
13
13
|
logger = get_logger(__name__)
|
|
14
14
|
|
|
@@ -9,8 +9,8 @@ import time
|
|
|
9
9
|
from datetime import timedelta
|
|
10
10
|
from typing import Any, Callable, Dict, Optional, Union
|
|
11
11
|
|
|
12
|
-
from
|
|
13
|
-
from helper.logging import get_logger
|
|
12
|
+
from .runner import Runner, SmallRunner, go_func
|
|
13
|
+
from ..helper.logging import get_logger
|
|
14
14
|
|
|
15
15
|
logger = get_logger(__name__)
|
|
16
16
|
|
|
@@ -4,7 +4,7 @@ Provides database handlers and SQL loading using helper.database classes.
|
|
|
4
4
|
"""
|
|
5
5
|
|
|
6
6
|
# Import from helper for core database functionality
|
|
7
|
-
from helper.database import (
|
|
7
|
+
from ..helper.database import (
|
|
8
8
|
Database,
|
|
9
9
|
DatabaseConfiguration,
|
|
10
10
|
new_database,
|
|
@@ -12,7 +12,7 @@ from helper.database import (
|
|
|
12
12
|
)
|
|
13
13
|
|
|
14
14
|
# Import deprecated SQL loader from helper.sql module
|
|
15
|
-
from helper.sql import (
|
|
15
|
+
from ..helper.sql import (
|
|
16
16
|
SQLLoader,
|
|
17
17
|
)
|
|
18
18
|
|
|
@@ -42,7 +42,6 @@ __all__ = [
|
|
|
42
42
|
# Worker handler
|
|
43
43
|
"WorkerDBHandler",
|
|
44
44
|
# Listeners
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"DBListenerWorker",
|
|
45
|
+
"QueuerListener",
|
|
46
|
+
"new_queuer_db_listener",
|
|
48
47
|
]
|
|
@@ -9,11 +9,11 @@ from typing import List, Optional, Tuple
|
|
|
9
9
|
from uuid import UUID
|
|
10
10
|
from psycopg.rows import dict_row
|
|
11
11
|
|
|
12
|
-
from helper.database import Database
|
|
13
|
-
from helper.error import QueuerError
|
|
14
|
-
from helper.sql import SQLLoader, run_ddl
|
|
15
|
-
from model.job import Job
|
|
16
|
-
from model.worker import Worker
|
|
12
|
+
from ..helper.database import Database
|
|
13
|
+
from ..helper.error import QueuerError
|
|
14
|
+
from ..helper.sql import SQLLoader, run_ddl
|
|
15
|
+
from ..model.job import Job
|
|
16
|
+
from ..model.worker import Worker
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
class JobDBHandler:
|
|
@@ -9,8 +9,8 @@ from typing import Optional, Callable, Awaitable
|
|
|
9
9
|
import psycopg
|
|
10
10
|
from psycopg import AsyncConnection
|
|
11
11
|
|
|
12
|
-
from helper.database import DatabaseConfiguration
|
|
13
|
-
from helper.error import QueuerError
|
|
12
|
+
from ..helper.database import DatabaseConfiguration
|
|
13
|
+
from ..helper.error import QueuerError
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
class QueuerListener:
|
|
@@ -7,10 +7,10 @@ import json
|
|
|
7
7
|
from typing import Optional
|
|
8
8
|
from psycopg.rows import dict_row
|
|
9
9
|
|
|
10
|
-
from helper.database import Database
|
|
11
|
-
from helper.sql import SQLLoader, run_ddl
|
|
12
|
-
from model.master import Master, MasterSettings
|
|
13
|
-
from model.worker import Worker
|
|
10
|
+
from ..helper.database import Database
|
|
11
|
+
from ..helper.sql import SQLLoader, run_ddl
|
|
12
|
+
from ..model.master import Master, MasterSettings
|
|
13
|
+
from ..model.worker import Worker
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
class MasterDBHandler:
|
|
@@ -9,10 +9,10 @@ from typing import List, Optional
|
|
|
9
9
|
from uuid import UUID
|
|
10
10
|
from psycopg.rows import dict_row
|
|
11
11
|
|
|
12
|
-
from helper.database import Database
|
|
13
|
-
from helper.sql import SQLLoader, run_ddl
|
|
14
|
-
from model.worker import Worker, WorkerStatus
|
|
15
|
-
from model.connection import Connection as ConnectionModel
|
|
12
|
+
from ..helper.database import Database
|
|
13
|
+
from ..helper.sql import SQLLoader, run_ddl
|
|
14
|
+
from ..model.worker import Worker, WorkerStatus
|
|
15
|
+
from ..model.connection import Connection as ConnectionModel
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
class WorkerDBHandler:
|
|
@@ -5,6 +5,7 @@ Mirrors Go's helper/error.go with Python exception handling.
|
|
|
5
5
|
|
|
6
6
|
import inspect
|
|
7
7
|
from types import FrameType
|
|
8
|
+
from typing import Optional
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
class QueuerError(Exception):
|
|
@@ -18,7 +19,7 @@ class QueuerError(Exception):
|
|
|
18
19
|
traceWithFunction = trace
|
|
19
20
|
current_frame = inspect.currentframe()
|
|
20
21
|
|
|
21
|
-
frame: FrameType
|
|
22
|
+
frame: Optional[FrameType] = None
|
|
22
23
|
if current_frame is not None:
|
|
23
24
|
frame = current_frame.f_back
|
|
24
25
|
|
|
@@ -9,7 +9,7 @@ from datetime import datetime
|
|
|
9
9
|
from typing import List, Any, Optional, Callable, Dict, Union
|
|
10
10
|
from uuid import UUID, uuid4
|
|
11
11
|
|
|
12
|
-
from helper.task import get_task_name_from_interface
|
|
12
|
+
from ..helper.task import get_task_name_from_interface
|
|
13
13
|
from .options import Options
|
|
14
14
|
|
|
15
15
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "queuerPy"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.11.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"
|
|
@@ -62,15 +62,10 @@ packages = ["queuerPy", "queuerPy.core", "queuerPy.database", "queuerPy.helper",
|
|
|
62
62
|
|
|
63
63
|
[tool.setuptools.package-dir]
|
|
64
64
|
"queuerPy" = "."
|
|
65
|
-
"queuerPy.core" = "core"
|
|
66
|
-
"queuerPy.database" = "database"
|
|
67
|
-
"queuerPy.helper" = "helper"
|
|
68
|
-
"queuerPy.model" = "model"
|
|
69
|
-
"queuerPy.sql" = "sql"
|
|
70
65
|
|
|
71
66
|
[tool.setuptools.package-data]
|
|
72
|
-
"queuerPy" = ["
|
|
73
|
-
"
|
|
67
|
+
"queuerPy" = ["py.typed"]
|
|
68
|
+
"queuerPy.sql" = ["*.sql"]
|
|
74
69
|
|
|
75
70
|
[tool.pytest.ini_options]
|
|
76
71
|
testpaths = ["."]
|
|
@@ -97,7 +92,7 @@ pythonVersion = "3.8"
|
|
|
97
92
|
pythonPlatform = "All"
|
|
98
93
|
|
|
99
94
|
[tool.mypy]
|
|
100
|
-
python_version = "0.
|
|
95
|
+
python_version = "0.11.0"
|
|
101
96
|
warn_return_any = true
|
|
102
97
|
warn_unused_configs = true
|
|
103
98
|
disallow_untyped_defs = true
|
|
@@ -14,20 +14,20 @@ from datetime import datetime, timedelta
|
|
|
14
14
|
from typing import Optional, Dict, Callable, Any
|
|
15
15
|
from uuid import UUID
|
|
16
16
|
|
|
17
|
-
from core.ticker import Ticker
|
|
18
|
-
from core.runner import Runner, SmallRunner, go_func
|
|
19
|
-
from database.db_listener import QueuerListener, new_queuer_db_listener
|
|
20
|
-
from helper.logging import get_logger
|
|
21
|
-
from helper.database import DatabaseConfiguration
|
|
22
|
-
from model.job import Job, JobStatus
|
|
23
|
-
from model.worker import Worker, new_worker, new_worker_with_options, WorkerStatus
|
|
24
|
-
from model.master import MasterSettings
|
|
25
|
-
from model.options_on_error import OnError
|
|
26
|
-
from queuer_job import QueuerJobMixin
|
|
27
|
-
from queuer_task import QueuerTaskMixin
|
|
28
|
-
from queuer_next_interval import QueuerNextIntervalMixin
|
|
29
|
-
from queuer_listener import QueuerListenerMixin
|
|
30
|
-
from queuer_master import QueuerMasterMixin
|
|
17
|
+
from .core.ticker import Ticker
|
|
18
|
+
from .core.runner import Runner, SmallRunner, go_func
|
|
19
|
+
from .database.db_listener import QueuerListener, new_queuer_db_listener
|
|
20
|
+
from .helper.logging import get_logger
|
|
21
|
+
from .helper.database import DatabaseConfiguration
|
|
22
|
+
from .model.job import Job, JobStatus
|
|
23
|
+
from .model.worker import Worker, new_worker, new_worker_with_options, WorkerStatus
|
|
24
|
+
from .model.master import MasterSettings
|
|
25
|
+
from .model.options_on_error import OnError
|
|
26
|
+
from .queuer_job import QueuerJobMixin
|
|
27
|
+
from .queuer_task import QueuerTaskMixin
|
|
28
|
+
from .queuer_next_interval import QueuerNextIntervalMixin
|
|
29
|
+
from .queuer_listener import QueuerListenerMixin
|
|
30
|
+
from .queuer_master import QueuerMasterMixin
|
|
31
31
|
|
|
32
32
|
logger = get_logger(__name__)
|
|
33
33
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: queuerPy
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.11.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>
|
|
@@ -22,6 +22,33 @@ queuer_task.py
|
|
|
22
22
|
./queuer_master.py
|
|
23
23
|
./queuer_next_interval.py
|
|
24
24
|
./queuer_task.py
|
|
25
|
+
./core/__init__.py
|
|
26
|
+
./core/broadcaster.py
|
|
27
|
+
./core/listener.py
|
|
28
|
+
./core/retryer.py
|
|
29
|
+
./core/runner.py
|
|
30
|
+
./core/scheduler.py
|
|
31
|
+
./core/ticker.py
|
|
32
|
+
./database/__init__.py
|
|
33
|
+
./database/db_job.py
|
|
34
|
+
./database/db_listener.py
|
|
35
|
+
./database/db_master.py
|
|
36
|
+
./database/db_worker.py
|
|
37
|
+
./helper/__init__.py
|
|
38
|
+
./helper/database.py
|
|
39
|
+
./helper/error.py
|
|
40
|
+
./helper/logging.py
|
|
41
|
+
./helper/sql.py
|
|
42
|
+
./helper/task.py
|
|
43
|
+
./model/__init__.py
|
|
44
|
+
./model/batch_job.py
|
|
45
|
+
./model/connection.py
|
|
46
|
+
./model/job.py
|
|
47
|
+
./model/master.py
|
|
48
|
+
./model/options.py
|
|
49
|
+
./model/options_on_error.py
|
|
50
|
+
./model/task.py
|
|
51
|
+
./model/worker.py
|
|
25
52
|
./sql/job.sql
|
|
26
53
|
./sql/master.sql
|
|
27
54
|
./sql/notify.sql
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import threading
|
|
2
2
|
from typing import Any, Callable, Dict, Optional
|
|
3
|
-
|
|
4
|
-
from core.
|
|
5
|
-
from
|
|
6
|
-
from database.
|
|
7
|
-
from database.
|
|
8
|
-
from
|
|
9
|
-
from helper.
|
|
10
|
-
from
|
|
11
|
-
from model.
|
|
12
|
-
from model.
|
|
3
|
+
|
|
4
|
+
from .core.broadcaster import new_broadcaster
|
|
5
|
+
from .core.listener import Listener
|
|
6
|
+
from .database.db_job import JobDBHandler
|
|
7
|
+
from .database.db_master import MasterDBHandler
|
|
8
|
+
from .database.db_worker import WorkerDBHandler
|
|
9
|
+
from .helper.database import Database, DatabaseConfiguration, new_database
|
|
10
|
+
from .helper.logging import get_logger
|
|
11
|
+
from .model.job import Job
|
|
12
|
+
from .model.task import Task
|
|
13
|
+
from .model.worker import Worker
|
|
13
14
|
|
|
14
15
|
logger = get_logger()
|
|
15
16
|
|
|
@@ -9,17 +9,17 @@ from datetime import datetime
|
|
|
9
9
|
from typing import Dict, List, Optional, Any, Tuple, Union, Callable
|
|
10
10
|
from uuid import UUID
|
|
11
11
|
|
|
12
|
-
from core.broadcaster import BroadcasterQueue
|
|
13
|
-
from core.runner import Runner, SmallRunner
|
|
14
|
-
from core.retryer import Retryer
|
|
15
|
-
from core.scheduler import Scheduler
|
|
16
|
-
from helper.error import QueuerError
|
|
17
|
-
from helper.task import get_task_name_from_interface
|
|
18
|
-
from model.batch_job import BatchJob
|
|
19
|
-
from model.job import Job, JobStatus, new_job as create_job
|
|
20
|
-
from model.options import Options
|
|
21
|
-
from model.worker import Worker
|
|
22
|
-
from queuer_global import QueuerGlobalMixin
|
|
12
|
+
from .core.broadcaster import BroadcasterQueue
|
|
13
|
+
from .core.runner import Runner, SmallRunner
|
|
14
|
+
from .core.retryer import Retryer
|
|
15
|
+
from .core.scheduler import Scheduler
|
|
16
|
+
from .helper.error import QueuerError
|
|
17
|
+
from .helper.task import get_task_name_from_interface
|
|
18
|
+
from .model.batch_job import BatchJob
|
|
19
|
+
from .model.job import Job, JobStatus, new_job as create_job
|
|
20
|
+
from .model.options import Options
|
|
21
|
+
from .model.worker import Worker
|
|
22
|
+
from .queuer_global import QueuerGlobalMixin
|
|
23
23
|
|
|
24
24
|
# Set up logger
|
|
25
25
|
logger = logging.getLogger(__name__)
|
|
@@ -6,8 +6,8 @@ Mirrors Go's queuerListener.go functionality.
|
|
|
6
6
|
import logging
|
|
7
7
|
from typing import Callable
|
|
8
8
|
|
|
9
|
-
from queuer_global import QueuerGlobalMixin
|
|
10
|
-
from model.job import Job
|
|
9
|
+
from .queuer_global import QueuerGlobalMixin
|
|
10
|
+
from .model.job import Job
|
|
11
11
|
|
|
12
12
|
logger = logging.getLogger(__name__)
|
|
13
13
|
|
|
@@ -6,12 +6,12 @@ Mirrors the Go queuerMaster.go with Python async patterns.
|
|
|
6
6
|
from datetime import timedelta
|
|
7
7
|
from typing import Optional
|
|
8
8
|
|
|
9
|
-
from core.runner import go_func
|
|
10
|
-
from core.ticker import Ticker
|
|
11
|
-
from helper.logging import get_logger
|
|
12
|
-
from helper.error import QueuerError
|
|
13
|
-
from model.master import Master, MasterSettings
|
|
14
|
-
from queuer_global import QueuerGlobalMixin
|
|
9
|
+
from .core.runner import go_func
|
|
10
|
+
from .core.ticker import Ticker
|
|
11
|
+
from .helper.logging import get_logger
|
|
12
|
+
from .helper.error import QueuerError
|
|
13
|
+
from .model.master import Master, MasterSettings
|
|
14
|
+
from .queuer_global import QueuerGlobalMixin
|
|
15
15
|
|
|
16
16
|
logger = get_logger(__name__)
|
|
17
17
|
|
|
@@ -6,8 +6,8 @@ Mirrors Go's queuerNextInterval.go functionality.
|
|
|
6
6
|
import logging
|
|
7
7
|
from typing import Any, Callable
|
|
8
8
|
|
|
9
|
-
from queuer_global import QueuerGlobalMixin
|
|
10
|
-
from model.worker import Worker
|
|
9
|
+
from .queuer_global import QueuerGlobalMixin
|
|
10
|
+
from .model.worker import Worker
|
|
11
11
|
|
|
12
12
|
logger = logging.getLogger(__name__)
|
|
13
13
|
|
|
@@ -32,10 +32,7 @@ class QueuerNextIntervalMixin(QueuerGlobalMixin):
|
|
|
32
32
|
:raises ValueError: If function is None
|
|
33
33
|
:raises RuntimeError: If function already exists or database update fails
|
|
34
34
|
"""
|
|
35
|
-
from helper.task import get_task_name_from_interface
|
|
36
|
-
|
|
37
|
-
if nif is None:
|
|
38
|
-
raise ValueError("NextIntervalFunc cannot be None")
|
|
35
|
+
from .helper.task import get_task_name_from_interface
|
|
39
36
|
|
|
40
37
|
try:
|
|
41
38
|
nif_name = get_task_name_from_interface(nif)
|
|
@@ -6,9 +6,9 @@ Mirrors Go's queuerTask.go functionality.
|
|
|
6
6
|
import logging
|
|
7
7
|
from typing import Any, Callable, Optional, TypeVar, overload
|
|
8
8
|
|
|
9
|
-
from model.task import new_task, new_task_with_name
|
|
10
|
-
from model.task import Task
|
|
11
|
-
from queuer_global import QueuerGlobalMixin
|
|
9
|
+
from .model.task import new_task, new_task_with_name
|
|
10
|
+
from .model.task import Task
|
|
11
|
+
from .queuer_global import QueuerGlobalMixin
|
|
12
12
|
|
|
13
13
|
logger = logging.getLogger(__name__)
|
|
14
14
|
|
|
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
|