scalable-pypeline 2.1.25__py2.py3-none-any.whl → 2.1.26__py2.py3-none-any.whl
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 scalable-pypeline might be problematic. Click here for more details.
- pypeline/__init__.py +1 -1
- pypeline/pipelines/composition/parallel_pipeline_composition.py +29 -2
- {scalable_pypeline-2.1.25.dist-info → scalable_pypeline-2.1.26.dist-info}/METADATA +1 -1
- {scalable_pypeline-2.1.25.dist-info → scalable_pypeline-2.1.26.dist-info}/RECORD +8 -8
- {scalable_pypeline-2.1.25.dist-info → scalable_pypeline-2.1.26.dist-info}/LICENSE +0 -0
- {scalable_pypeline-2.1.25.dist-info → scalable_pypeline-2.1.26.dist-info}/WHEEL +0 -0
- {scalable_pypeline-2.1.25.dist-info → scalable_pypeline-2.1.26.dist-info}/entry_points.txt +0 -0
- {scalable_pypeline-2.1.25.dist-info → scalable_pypeline-2.1.26.dist-info}/top_level.txt +0 -0
pypeline/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "2.1.
|
|
1
|
+
__version__ = "2.1.26"
|
|
@@ -5,12 +5,22 @@ import json
|
|
|
5
5
|
import time
|
|
6
6
|
import typing
|
|
7
7
|
from uuid import uuid4
|
|
8
|
+
from urllib.parse import urlparse
|
|
8
9
|
|
|
9
10
|
from dramatiq.broker import get_broker
|
|
10
11
|
from dramatiq.results import ResultMissing
|
|
11
12
|
from db_medley.redis_conf import RedisConnector
|
|
12
13
|
from redis.exceptions import RedisError
|
|
13
|
-
|
|
14
|
+
from redis.sentinel import Sentinel
|
|
15
|
+
from pypeline.constants import (
|
|
16
|
+
REDIS_URL,
|
|
17
|
+
REDIS_SENTINEL_MASTER_NAME,
|
|
18
|
+
DEFAULT_REDIS_SOCKET_CONNECT_TIMEOUT,
|
|
19
|
+
DEFAULT_REDIS_SOCKET_TIMEOUT,
|
|
20
|
+
DEFAULT_REDIS_RETRY_ON_TIMEOUT,
|
|
21
|
+
DEFAULT_REDIS_SOCKET_KEEPALIVE,
|
|
22
|
+
DEFAULT_REDIS_HEALTH_CHECK_INTERVAL,
|
|
23
|
+
)
|
|
14
24
|
from pypeline.barrier import LockingParallelBarrier
|
|
15
25
|
from pypeline.constants import DEFAULT_RESULT_TTL
|
|
16
26
|
from pypeline.dramatiq import REDIS_URL
|
|
@@ -240,9 +250,26 @@ class PipelineResult:
|
|
|
240
250
|
self.pipeline: parallel_pipeline = None
|
|
241
251
|
self.execution_id = execution_id
|
|
242
252
|
self.redis_key = f"{execution_id}-results-key"
|
|
243
|
-
self.redis_conn = RedisConnector().get_connection()
|
|
244
253
|
self.result_ttl = result_ttl
|
|
245
254
|
|
|
255
|
+
if REDIS_SENTINEL_MASTER_NAME is not None:
|
|
256
|
+
parsed_redis_url = urlparse(REDIS_URL)
|
|
257
|
+
redis_sentinel = Sentinel(
|
|
258
|
+
sentinels=[(parsed_redis_url.hostname, parsed_redis_url.port)],
|
|
259
|
+
)
|
|
260
|
+
self.redis_conn = redis_sentinel.master_for(
|
|
261
|
+
REDIS_SENTINEL_MASTER_NAME,
|
|
262
|
+
db=int(parsed_redis_url.path[1]) if parsed_redis_url.path else 0,
|
|
263
|
+
password=parsed_redis_url.password,
|
|
264
|
+
socket_connect_timeout=DEFAULT_REDIS_SOCKET_CONNECT_TIMEOUT,
|
|
265
|
+
socket_timeout=DEFAULT_REDIS_SOCKET_TIMEOUT,
|
|
266
|
+
retry_on_timeout=DEFAULT_REDIS_RETRY_ON_TIMEOUT,
|
|
267
|
+
socket_keepalive=DEFAULT_REDIS_SOCKET_KEEPALIVE,
|
|
268
|
+
health_check_interval=DEFAULT_REDIS_HEALTH_CHECK_INTERVAL,
|
|
269
|
+
)
|
|
270
|
+
else:
|
|
271
|
+
self.redis_conn = RedisConnector().get_connection()
|
|
272
|
+
|
|
246
273
|
def create_result_entry(self, pipeline_json_str: str):
|
|
247
274
|
"""
|
|
248
275
|
Store the serialized pipeline data in Redis with a specified TTL.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
pypeline/__init__.py,sha256=
|
|
1
|
+
pypeline/__init__.py,sha256=kDsQujSOEts9DhAOHBOlEjAEDf0lqYMUYrA9xzjlvh0,23
|
|
2
2
|
pypeline/barrier.py,sha256=ojSgbuZnGKpKiSBYXTV4CxG9j1Z01YdzBSORli4MnzI,2376
|
|
3
3
|
pypeline/constants.py,sha256=7COt9jfmLDvCNAFeN6ddRpwdvv2LpbYOCIQs6dPXpOQ,3592
|
|
4
4
|
pypeline/dramatiq.py,sha256=XPpgPgiOaEFK8zORx9eveJ45wzcUXMjVGryFKY5Xiwg,15527
|
|
@@ -17,7 +17,7 @@ pypeline/flask/api/schedules.py,sha256=8PKCMdPucaer8opchNlI5aDssK2UqT79hHpeg5BMt
|
|
|
17
17
|
pypeline/pipelines/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
18
|
pypeline/pipelines/factory.py,sha256=ftm6AwXIdkC8LEzy3c4CLPzXtoQonBKUo3yojbYTsUE,3309
|
|
19
19
|
pypeline/pipelines/composition/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
|
-
pypeline/pipelines/composition/parallel_pipeline_composition.py,sha256=
|
|
20
|
+
pypeline/pipelines/composition/parallel_pipeline_composition.py,sha256=JrEsIxaB36wLWg5ztCMkANye9VizGuRIhyxyCP4DCl8,14162
|
|
21
21
|
pypeline/pipelines/composition/pypeline_composition.py,sha256=lY1RO7luLqDBLfoX99YbBatx1Qov1cxGoS5lRAjB_DQ,8534
|
|
22
22
|
pypeline/pipelines/middleware/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
23
|
pypeline/pipelines/middleware/get_active_worker_id_middleware.py,sha256=X4ZfRk3L8MD00DTsGHth7oOdy-W7LQV96T8vu5UC42A,755
|
|
@@ -33,9 +33,9 @@ pypeline/utils/module_utils.py,sha256=-yEJIukDCoXnmlZVXB6Dww25tH6GdPE5SoFqv6pfdV
|
|
|
33
33
|
pypeline/utils/pipeline_utils.py,sha256=kGP1QwCJikGC5QNRtzRXCDVewyRMpWIqERTNnxGLlSY,4795
|
|
34
34
|
pypeline/utils/schema_utils.py,sha256=Fgl0y9Cuo_TZeEx_S3gaSVnLjn6467LTkjb2ek7Ms98,851
|
|
35
35
|
tests/fixtures/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
36
|
-
scalable_pypeline-2.1.
|
|
37
|
-
scalable_pypeline-2.1.
|
|
38
|
-
scalable_pypeline-2.1.
|
|
39
|
-
scalable_pypeline-2.1.
|
|
40
|
-
scalable_pypeline-2.1.
|
|
41
|
-
scalable_pypeline-2.1.
|
|
36
|
+
scalable_pypeline-2.1.26.dist-info/LICENSE,sha256=DVQuDIgE45qn836wDaWnYhSdxoLXgpRRKH4RuTjpRZQ,10174
|
|
37
|
+
scalable_pypeline-2.1.26.dist-info/METADATA,sha256=T-yqcbiyL6nJ6SvJkmrH9n0lPvXjdJ9m4QLny-VPHyU,5985
|
|
38
|
+
scalable_pypeline-2.1.26.dist-info/WHEEL,sha256=bb2Ot9scclHKMOLDEHY6B2sicWOgugjFKaJsT7vwMQo,110
|
|
39
|
+
scalable_pypeline-2.1.26.dist-info/entry_points.txt,sha256=uWs10ODfHSBKo2Cx_QaUjPHQTpZ3e77j9VlAdRRmMyg,119
|
|
40
|
+
scalable_pypeline-2.1.26.dist-info/top_level.txt,sha256=C7dpkEOc_-nnsAQb28BfQknjD6XHRyS9ZrvVeoIbV7s,15
|
|
41
|
+
scalable_pypeline-2.1.26.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|