scalable-pypeline 2.0.4__tar.gz → 2.0.5__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.
- {scalable-pypeline-2.0.4/scalable_pypeline.egg-info → scalable-pypeline-2.0.5}/PKG-INFO +1 -1
- scalable-pypeline-2.0.5/pypeline/__init__.py +1 -0
- {scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5}/pypeline/constants.py +10 -1
- {scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5}/pypeline/dramatiq.py +20 -1
- {scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5/scalable_pypeline.egg-info}/PKG-INFO +1 -1
- scalable-pypeline-2.0.4/pypeline/__init__.py +0 -1
- {scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5}/LICENSE +0 -0
- {scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5}/MANIFEST.in +0 -0
- {scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5}/README.md +0 -0
- {scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5}/pypeline/barrier.py +0 -0
- {scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5}/pypeline/composition.py +0 -0
- {scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5}/pypeline/extensions.py +0 -0
- {scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5}/pypeline/flask/__init__.py +0 -0
- {scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5}/pypeline/flask/api/__init__.py +0 -0
- {scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5}/pypeline/flask/api/pipelines.py +0 -0
- {scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5}/pypeline/flask/api/schedules.py +0 -0
- {scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5}/pypeline/flask/decorators.py +0 -0
- {scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5}/pypeline/flask/flask_pypeline.py +0 -0
- {scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5}/pypeline/middleware.py +0 -0
- {scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5}/pypeline/pipeline_config_schema.py +0 -0
- {scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5}/pypeline/pypeline_yaml.py +0 -0
- {scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5}/pypeline/schedule_config_schema.py +0 -0
- {scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5}/pypeline/utils/__init__.py +0 -0
- {scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5}/pypeline/utils/config_utils.py +0 -0
- {scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5}/pypeline/utils/module_utils.py +0 -0
- {scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5}/pypeline/utils/pipeline_utils.py +0 -0
- {scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5}/requirements.txt +0 -0
- {scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5}/scalable_pypeline.egg-info/SOURCES.txt +0 -0
- {scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5}/scalable_pypeline.egg-info/dependency_links.txt +0 -0
- {scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5}/scalable_pypeline.egg-info/entry_points.txt +0 -0
- {scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5}/scalable_pypeline.egg-info/requires.txt +0 -0
- {scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5}/scalable_pypeline.egg-info/top_level.txt +0 -0
- {scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5}/setup.cfg +0 -0
- {scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5}/setup.py +0 -0
- {scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5}/tests/fixtures/__init__.py +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "2.0.5"
|
@@ -1,5 +1,6 @@
|
|
1
1
|
""" Pypeline Constants
|
2
2
|
"""
|
3
|
+
|
3
4
|
import os
|
4
5
|
|
5
6
|
# Pypeline configuration defaults
|
@@ -26,7 +27,15 @@ DEFAULT_TASK_MIN_BACKOFF = int(os.getenv("DEFAULT_TASK_MIN_BACKOFF", 15)) # sec
|
|
26
27
|
DEFAULT_TASK_MAX_BACKOFF = int(
|
27
28
|
os.getenv("DEFAULT_TASK_MAX_BACKOFF", 3600)
|
28
29
|
) # seconds (1 hour)
|
29
|
-
|
30
|
+
DEFAULT_BROKER_CONNECTION_HEARTBEAT = int(
|
31
|
+
os.getenv("DEFAULT_BROKER_CONNECTION_HEARTBEAT", 5)
|
32
|
+
)
|
33
|
+
DEFAULT_BROKER_CONNECTION_ATTEMPTS = int(
|
34
|
+
os.getenv("DEFAULT_BROKER_CONNECTION_ATTEMPTS", 5)
|
35
|
+
)
|
36
|
+
DEFAULT_BROKER_BLOCKED_CONNECTION_TIMEOUT = int(
|
37
|
+
os.getenv("DEFAULT_BROKER_BLOCKED_CONNECTION_TIMEOUT", 30)
|
38
|
+
)
|
30
39
|
|
31
40
|
MS_IN_SECONDS = 1000
|
32
41
|
API_PATH_V1 = "/api/v1"
|
@@ -2,7 +2,10 @@ import importlib
|
|
2
2
|
import os.path
|
3
3
|
import sys
|
4
4
|
import typing
|
5
|
+
import pika
|
5
6
|
import logging
|
7
|
+
from urllib.parse import urlparse
|
8
|
+
|
6
9
|
import click
|
7
10
|
from pypeline.extensions import pypeline_config
|
8
11
|
from warnings import warn
|
@@ -35,6 +38,9 @@ from pypeline.constants import (
|
|
35
38
|
DEFAULT_TASK_MAX_RETRY,
|
36
39
|
DEFAULT_TASK_MIN_BACKOFF,
|
37
40
|
DEFAULT_TASK_MAX_BACKOFF,
|
41
|
+
DEFAULT_BROKER_CONNECTION_HEARTBEAT,
|
42
|
+
DEFAULT_BROKER_BLOCKED_CONNECTION_TIMEOUT,
|
43
|
+
DEFAULT_BROKER_CONNECTION_ATTEMPTS,
|
38
44
|
)
|
39
45
|
from pypeline.middleware import ParallelPipeline
|
40
46
|
from pypeline.utils.config_utils import (
|
@@ -56,7 +62,20 @@ logger = logging.getLogger(__name__)
|
|
56
62
|
|
57
63
|
def configure_default_broker(broker: Broker = None):
|
58
64
|
redis_backend = RedisBackend(url=REDIS_URL)
|
59
|
-
|
65
|
+
parsed_url = urlparse(RABBIT_URL)
|
66
|
+
credentials = pika.PlainCredentials(parsed_url.username, parsed_url.password)
|
67
|
+
rabbit_broker = (
|
68
|
+
broker
|
69
|
+
if broker is not None
|
70
|
+
else RabbitmqBroker(
|
71
|
+
host=parsed_url.host,
|
72
|
+
port=parsed_url.port,
|
73
|
+
credentials=credentials,
|
74
|
+
heartbeat=DEFAULT_BROKER_CONNECTION_HEARTBEAT,
|
75
|
+
connection_attempts=DEFAULT_BROKER_CONNECTION_ATTEMPTS,
|
76
|
+
blocked_connection_timeout=DEFAULT_BROKER_BLOCKED_CONNECTION_TIMEOUT,
|
77
|
+
)
|
78
|
+
)
|
60
79
|
rabbit_broker.add_middleware(Results(backend=redis_backend))
|
61
80
|
rabbit_broker.add_middleware(ParallelPipeline(redis_url=REDIS_URL))
|
62
81
|
rabbit_broker.add_middleware(CurrentMessage())
|
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = "2.0.4"
|
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
|
{scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5}/scalable_pypeline.egg-info/dependency_links.txt
RENAMED
File without changes
|
{scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5}/scalable_pypeline.egg-info/entry_points.txt
RENAMED
File without changes
|
File without changes
|
{scalable-pypeline-2.0.4 → scalable-pypeline-2.0.5}/scalable_pypeline.egg-info/top_level.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|