scalable-pypeline 3.0.0__tar.gz → 3.0.1__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.
Files changed (35) hide show
  1. {scalable-pypeline-3.0.0/scalable_pypeline.egg-info → scalable-pypeline-3.0.1}/PKG-INFO +1 -1
  2. scalable-pypeline-3.0.1/pypeline/__init__.py +1 -0
  3. {scalable-pypeline-3.0.0 → scalable-pypeline-3.0.1}/pypeline/constants.py +6 -0
  4. {scalable-pypeline-3.0.0 → scalable-pypeline-3.0.1}/pypeline/dramatiq.py +20 -6
  5. {scalable-pypeline-3.0.0 → scalable-pypeline-3.0.1/scalable_pypeline.egg-info}/PKG-INFO +1 -1
  6. {scalable-pypeline-3.0.0 → scalable-pypeline-3.0.1}/scalable_pypeline.egg-info/requires.txt +3 -2
  7. {scalable-pypeline-3.0.0 → scalable-pypeline-3.0.1}/setup.py +3 -2
  8. scalable-pypeline-3.0.0/pypeline/__init__.py +0 -1
  9. {scalable-pypeline-3.0.0 → scalable-pypeline-3.0.1}/LICENSE +0 -0
  10. {scalable-pypeline-3.0.0 → scalable-pypeline-3.0.1}/MANIFEST.in +0 -0
  11. {scalable-pypeline-3.0.0 → scalable-pypeline-3.0.1}/README.md +0 -0
  12. {scalable-pypeline-3.0.0 → scalable-pypeline-3.0.1}/pypeline/barrier.py +0 -0
  13. {scalable-pypeline-3.0.0 → scalable-pypeline-3.0.1}/pypeline/composition.py +0 -0
  14. {scalable-pypeline-3.0.0 → scalable-pypeline-3.0.1}/pypeline/extensions.py +0 -0
  15. {scalable-pypeline-3.0.0 → scalable-pypeline-3.0.1}/pypeline/flask/__init__.py +0 -0
  16. {scalable-pypeline-3.0.0 → scalable-pypeline-3.0.1}/pypeline/flask/api/__init__.py +0 -0
  17. {scalable-pypeline-3.0.0 → scalable-pypeline-3.0.1}/pypeline/flask/api/pipelines.py +0 -0
  18. {scalable-pypeline-3.0.0 → scalable-pypeline-3.0.1}/pypeline/flask/api/schedules.py +0 -0
  19. {scalable-pypeline-3.0.0 → scalable-pypeline-3.0.1}/pypeline/flask/decorators.py +0 -0
  20. {scalable-pypeline-3.0.0 → scalable-pypeline-3.0.1}/pypeline/flask/flask_pypeline.py +0 -0
  21. {scalable-pypeline-3.0.0 → scalable-pypeline-3.0.1}/pypeline/middleware.py +0 -0
  22. {scalable-pypeline-3.0.0 → scalable-pypeline-3.0.1}/pypeline/pipeline_config_schema.py +0 -0
  23. {scalable-pypeline-3.0.0 → scalable-pypeline-3.0.1}/pypeline/pypeline_yaml.py +0 -0
  24. {scalable-pypeline-3.0.0 → scalable-pypeline-3.0.1}/pypeline/schedule_config_schema.py +0 -0
  25. {scalable-pypeline-3.0.0 → scalable-pypeline-3.0.1}/pypeline/utils/__init__.py +0 -0
  26. {scalable-pypeline-3.0.0 → scalable-pypeline-3.0.1}/pypeline/utils/config_utils.py +0 -0
  27. {scalable-pypeline-3.0.0 → scalable-pypeline-3.0.1}/pypeline/utils/module_utils.py +0 -0
  28. {scalable-pypeline-3.0.0 → scalable-pypeline-3.0.1}/pypeline/utils/pipeline_utils.py +0 -0
  29. {scalable-pypeline-3.0.0 → scalable-pypeline-3.0.1}/requirements.txt +0 -0
  30. {scalable-pypeline-3.0.0 → scalable-pypeline-3.0.1}/scalable_pypeline.egg-info/SOURCES.txt +0 -0
  31. {scalable-pypeline-3.0.0 → scalable-pypeline-3.0.1}/scalable_pypeline.egg-info/dependency_links.txt +0 -0
  32. {scalable-pypeline-3.0.0 → scalable-pypeline-3.0.1}/scalable_pypeline.egg-info/entry_points.txt +0 -0
  33. {scalable-pypeline-3.0.0 → scalable-pypeline-3.0.1}/scalable_pypeline.egg-info/top_level.txt +0 -0
  34. {scalable-pypeline-3.0.0 → scalable-pypeline-3.0.1}/setup.cfg +0 -0
  35. {scalable-pypeline-3.0.0 → scalable-pypeline-3.0.1}/tests/fixtures/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: scalable-pypeline
3
- Version: 3.0.0
3
+ Version: 3.0.1
4
4
  Summary: PypeLine - Python pipelines for the Real World
5
5
  Home-page: https://gitlab.com/bravos2/pypeline
6
6
  Author: Bravos Power Corporation
@@ -0,0 +1 @@
1
+ __version__ = "3.0.1"
@@ -1,5 +1,6 @@
1
1
  """ Pypeline Constants
2
2
  """
3
+
3
4
  import os
4
5
 
5
6
  # Pypeline configuration defaults
@@ -26,6 +27,11 @@ 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)
30
+ DEFAULT_BROKER_HEARTBEAT = int(os.getenv("DEFAULT_BROKER_HEARTBEAT", 5))
31
+ DEFAULT_CONNECTION_ATTEMPTS = int(os.getenv("DEFAULT_CONNECTION_ATTEMPTS", 5))
32
+ DEFAULT_BLOCKED_CONNECTION_TIMEOUT = int(
33
+ os.getenv("DEFAULT_BLOCKED_CONNECTION_TIMEOUT", 30)
34
+ )
29
35
 
30
36
 
31
37
  MS_IN_SECONDS = 1000
@@ -1,15 +1,15 @@
1
1
  import importlib
2
+ import logging
2
3
  import os.path
3
4
  import sys
4
5
  import typing
5
- import logging
6
- import click
7
- from pypeline.extensions import pypeline_config
8
- from warnings import warn
9
6
  from functools import wraps
7
+ from typing import Awaitable, Callable, Optional, Union, TYPE_CHECKING, TypeVar
8
+ from warnings import warn
9
+
10
+ import click
10
11
  from apscheduler.schedulers.blocking import BlockingScheduler
11
12
  from apscheduler.triggers.cron import CronTrigger
12
- from typing import Awaitable, Callable, Optional, Union, TYPE_CHECKING, TypeVar
13
13
  from dramatiq import Broker, Middleware, actor as register_actor, set_broker, get_broker
14
14
  from dramatiq.brokers.rabbitmq import RabbitmqBroker
15
15
  from dramatiq.cli import (
@@ -35,7 +35,11 @@ from pypeline.constants import (
35
35
  DEFAULT_TASK_MAX_RETRY,
36
36
  DEFAULT_TASK_MIN_BACKOFF,
37
37
  DEFAULT_TASK_MAX_BACKOFF,
38
+ DEFAULT_BROKER_HEARTBEAT,
39
+ DEFAULT_CONNECTION_ATTEMPTS,
40
+ DEFAULT_BLOCKED_CONNECTION_TIMEOUT,
38
41
  )
42
+ from pypeline.extensions import pypeline_config
39
43
  from pypeline.middleware import ParallelPipeline
40
44
  from pypeline.utils.config_utils import (
41
45
  retrieve_latest_schedule_config,
@@ -56,7 +60,16 @@ logger = logging.getLogger(__name__)
56
60
 
57
61
  def configure_default_broker(broker: Broker = None):
58
62
  redis_backend = RedisBackend(url=REDIS_URL)
59
- rabbit_broker = broker if broker is not None else RabbitmqBroker(url=RABBIT_URL)
63
+ rabbit_broker = (
64
+ broker
65
+ if broker is not None
66
+ else RabbitmqBroker(
67
+ url=RABBIT_URL,
68
+ heartbeat=DEFAULT_BROKER_HEARTBEAT,
69
+ connection_attempts=DEFAULT_CONNECTION_ATTEMPTS,
70
+ blocked_connection_timeout=DEFAULT_BLOCKED_CONNECTION_TIMEOUT,
71
+ )
72
+ )
60
73
  rabbit_broker.add_middleware(Results(backend=redis_backend))
61
74
  rabbit_broker.add_middleware(ParallelPipeline(redis_url=REDIS_URL))
62
75
  rabbit_broker.add_middleware(CurrentMessage())
@@ -257,6 +270,7 @@ class Dramatiq:
257
270
  :param kw: Keywords argument passed to :func:`dramatiq.actor`.
258
271
 
259
272
  """
273
+
260
274
  # Substitute dramatiq.actor decorator to return a lazy wrapper. This
261
275
  # allows to register actors in extension before the broker is
262
276
  # effectively configured by init_app.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: scalable-pypeline
3
- Version: 3.0.0
3
+ Version: 3.0.1
4
4
  Summary: PypeLine - Python pipelines for the Real World
5
5
  Home-page: https://gitlab.com/bravos2/pypeline
6
6
  Author: Bravos Power Corporation
@@ -8,16 +8,17 @@ wheel
8
8
  twine
9
9
 
10
10
  [dev]
11
- blackd
11
+ black
12
12
 
13
13
  [flask]
14
14
  flask-smorest<0.45,>=0.44.0
15
+ werkzeug<4,>=3.0.1
16
+ flask<4,>=3.0.2
15
17
 
16
18
  [test]
17
19
  pytest-cov<3,>=2.6.1
18
20
  tox<4,>=3.14.1
19
21
  mock<2,>=1
20
- moto<4,>=1.3.16
21
22
  responses<0.11,>=0.10.16
22
23
  fakeredis<3,>=2.10.3
23
24
  importlib-metadata<5,>=4.12
@@ -175,6 +175,8 @@ setup(
175
175
  "build": ["wheel", "twine"],
176
176
  "flask": [
177
177
  "flask-smorest>=0.44.0,<0.45",
178
+ "werkzeug>=3.0.1,<4",
179
+ "flask>=3.0.2,<4",
178
180
  ],
179
181
  "web": ["gunicorn", "gevent>=21.12.0,<22"],
180
182
  "workers": [
@@ -182,12 +184,11 @@ setup(
182
184
  "dramatiq[rabbitmq]>=1.17.0,<2",
183
185
  "apscheduler>=3.10.4,<4",
184
186
  ],
185
- "dev": ["blackd"],
187
+ "dev": ["black"],
186
188
  "test": [
187
189
  "pytest-cov>=2.6.1,<3",
188
190
  "tox>=3.14.1,<4",
189
191
  "mock>=1,<2",
190
- "moto>=1.3.16,<4",
191
192
  "responses>=0.10.16,<0.11",
192
193
  "fakeredis>=2.10.3,<3",
193
194
  "importlib-metadata>=4.12,<5",
@@ -1 +0,0 @@
1
- __version__ = "3.0.0"