scalable-pypeline 2.1.6__py2.py3-none-any.whl → 2.1.8__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.
pypeline/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "2.1.6"
1
+ __version__ = "2.1.8"
pypeline/constants.py CHANGED
@@ -36,7 +36,9 @@ DEFAULT_BROKER_CONNECTION_ATTEMPTS = int(
36
36
  DEFAULT_BROKER_BLOCKED_CONNECTION_TIMEOUT = int(
37
37
  os.getenv("DEFAULT_BROKER_BLOCKED_CONNECTION_TIMEOUT", 30)
38
38
  )
39
- DEFAULT_BROKER_HEARTBEAT_TIMEOUT = int("DEFAULT_BROKER_HEARTBEAT_TIMEOUT", 300_000)
39
+ DEFAULT_BROKER_HEARTBEAT_TIMEOUT = int(
40
+ os.getenv("DEFAULT_BROKER_HEARTBEAT_TIMEOUT", 300000)
41
+ )
40
42
  MESSAGE_BROKER = os.getenv("MESSAGE_BROKER", "RABBITMQ")
41
43
 
42
44
  MS_IN_SECONDS = 1000
@@ -12,7 +12,11 @@ class GetActiveWorkerIdMiddleware(Middleware):
12
12
  return cls._ACTIVE_WORKER_ID.get()
13
13
 
14
14
  def before_process_message(self, broker, message):
15
- self._ACTIVE_WORKER_ID.set(broker.broker_id)
15
+ """Sets the active worker ID, verifying broker has a broker_id first."""
16
+ broker_id = getattr(broker, "broker_id", None)
17
+ if not broker_id:
18
+ return
19
+ self._ACTIVE_WORKER_ID.set(broker_id)
16
20
 
17
21
  def after_process_message(self, broker, message, *, result=None, exception=None):
18
22
  self._ACTIVE_WORKER_ID.set(None)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: scalable-pypeline
3
- Version: 2.1.6
3
+ Version: 2.1.8
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
@@ -1,6 +1,6 @@
1
- pypeline/__init__.py,sha256=Z4RaxSmfOjvKssLeOljGX3Csb8I17J-Dc7pSVg3Hb2U,22
1
+ pypeline/__init__.py,sha256=Zs7yBsCpiMSJW2PP_mZoH_3cEDqJwh80ulBcmuMBwMU,22
2
2
  pypeline/barrier.py,sha256=oO964l9qOCOibweOHyNivmAvufdXOke9nz2tdgclouo,1172
3
- pypeline/constants.py,sha256=CUo4hHfM0__nMjQq8Sr6N6sW5AwJddvvJhKrcXlST24,3033
3
+ pypeline/constants.py,sha256=EGSuLq4KhZ4bxrbtnUgKclELRyya5ipvv0WeybCzNAs,3049
4
4
  pypeline/dramatiq.py,sha256=5whdOQjzknLjl9lYNj5-f2jRw5ysRPhQExi5NN4KeOY,12837
5
5
  pypeline/extensions.py,sha256=BzOTnXhNxap3N7uIUUh_hO6dDwx08Vc_RJDE93_K0Lo,610
6
6
  pypeline/pipeline_config_schema.py,sha256=hK2_egtg-YFx_XJDs_NyrOTGKkel7W83X-G0sic52sM,10592
@@ -19,7 +19,7 @@ pypeline/pipelines/composition/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5
19
19
  pypeline/pipelines/composition/parallel_pipeline_composition.py,sha256=pTw9Xb9h4JnV4siFc3JStm5lB-i9djUADo3Kh5K3s7g,12976
20
20
  pypeline/pipelines/composition/pypeline_composition.py,sha256=UBuDKEfRoIbL-9c-HH2ZTVbzfkwFSlNoFH-AVNqt0QE,7965
21
21
  pypeline/pipelines/middleware/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
- pypeline/pipelines/middleware/get_active_worker_id_middleware.py,sha256=g2lDUUoUtD8do-x_XqGurkiKY_eNv0MUYSs5EchRwi0,581
22
+ pypeline/pipelines/middleware/get_active_worker_id_middleware.py,sha256=X4ZfRk3L8MD00DTsGHth7oOdy-W7LQV96T8vu5UC42A,755
23
23
  pypeline/pipelines/middleware/parallel_pipeline_middleware.py,sha256=kTp6niYoe2nXIiN6EGRfdpxrJyioo0GPxDkfefbGlEk,2821
24
24
  pypeline/pipelines/middleware/pypeline_middleware.py,sha256=IXVqzcOlSJ43lsn-i298RkaeygB-PTJjsvdTDtpgfwg,8141
25
25
  pypeline/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -29,9 +29,9 @@ pypeline/utils/module_utils.py,sha256=-yEJIukDCoXnmlZVXB6Dww25tH6GdPE5SoFqv6pfdV
29
29
  pypeline/utils/pipeline_utils.py,sha256=kGP1QwCJikGC5QNRtzRXCDVewyRMpWIqERTNnxGLlSY,4795
30
30
  pypeline/utils/schema_utils.py,sha256=Fgl0y9Cuo_TZeEx_S3gaSVnLjn6467LTkjb2ek7Ms98,851
31
31
  tests/fixtures/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
32
- scalable_pypeline-2.1.6.dist-info/LICENSE,sha256=DVQuDIgE45qn836wDaWnYhSdxoLXgpRRKH4RuTjpRZQ,10174
33
- scalable_pypeline-2.1.6.dist-info/METADATA,sha256=BOpe4jN8ylP1iOf8FJyvdgTAF0V66sCEhwaibPvf3_Q,5926
34
- scalable_pypeline-2.1.6.dist-info/WHEEL,sha256=bb2Ot9scclHKMOLDEHY6B2sicWOgugjFKaJsT7vwMQo,110
35
- scalable_pypeline-2.1.6.dist-info/entry_points.txt,sha256=uWs10ODfHSBKo2Cx_QaUjPHQTpZ3e77j9VlAdRRmMyg,119
36
- scalable_pypeline-2.1.6.dist-info/top_level.txt,sha256=C7dpkEOc_-nnsAQb28BfQknjD6XHRyS9ZrvVeoIbV7s,15
37
- scalable_pypeline-2.1.6.dist-info/RECORD,,
32
+ scalable_pypeline-2.1.8.dist-info/LICENSE,sha256=DVQuDIgE45qn836wDaWnYhSdxoLXgpRRKH4RuTjpRZQ,10174
33
+ scalable_pypeline-2.1.8.dist-info/METADATA,sha256=Am0pFOaaDgVx1-fBLrDzuOUseUENdXywqLIfAPA3U08,5926
34
+ scalable_pypeline-2.1.8.dist-info/WHEEL,sha256=bb2Ot9scclHKMOLDEHY6B2sicWOgugjFKaJsT7vwMQo,110
35
+ scalable_pypeline-2.1.8.dist-info/entry_points.txt,sha256=uWs10ODfHSBKo2Cx_QaUjPHQTpZ3e77j9VlAdRRmMyg,119
36
+ scalable_pypeline-2.1.8.dist-info/top_level.txt,sha256=C7dpkEOc_-nnsAQb28BfQknjD6XHRyS9ZrvVeoIbV7s,15
37
+ scalable_pypeline-2.1.8.dist-info/RECORD,,