bamboo-engine 2.6.2__tar.gz → 2.6.3__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.
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/PKG-INFO +1 -1
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/__version__.py +1 -1
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/engine.py +12 -2
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/eri/interfaces.py +10 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/pyproject.toml +1 -1
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/LICENSE +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/__init__.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/api.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/builder/__init__.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/builder/builder.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/builder/flow/__init__.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/builder/flow/activity.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/builder/flow/base.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/builder/flow/data.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/builder/flow/event.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/builder/flow/gateway.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/config.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/context.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/eri/__init__.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/eri/models/__init__.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/eri/models/event.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/eri/models/handler.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/eri/models/interrupt.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/eri/models/node.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/eri/models/runtime.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/exceptions.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/handler.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/handlers/__init__.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/handlers/conditional_parallel_gateway.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/handlers/converge_gateway.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/handlers/empty_end_event.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/handlers/empty_start_event.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/handlers/exclusive_gateway.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/handlers/executable_end_event.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/handlers/parallel_gateway.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/handlers/service_activity.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/handlers/subprocess.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/interrupt.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/local.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/metrics.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/states.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/template/__init__.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/template/sandbox.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/template/template.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/utils/__init__.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/utils/boolrule/__init__.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/utils/boolrule/boolrule.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/utils/collections.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/utils/constants.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/utils/graph.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/utils/host.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/utils/mako_safety.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/utils/mako_utils/__init__.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/utils/mako_utils/checker.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/utils/mako_utils/code_extract.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/utils/mako_utils/exceptions.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/utils/mako_utils/visitors.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/utils/object.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/utils/string.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/validator/__init__.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/validator/api.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/validator/connection.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/validator/gateway.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/validator/rules.py +0 -0
- {bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/validator/utils.py +0 -0
|
@@ -80,6 +80,7 @@ class Engine:
|
|
|
80
80
|
PURE_SKIP_ENABLE_NODE_TYPE = {NodeType.ServiceActivity, NodeType.EmptyStartEvent}
|
|
81
81
|
CALLBACK_LOCK_RETRY_HEADER = "callback_lock_retry_times"
|
|
82
82
|
CALLBACK_LOCK_RETRY_LIMIT = 3
|
|
83
|
+
CALLBACK_LOCK_RETRY_DELAY_RANGES = ((1, 3), (3, 6), (6, 10))
|
|
83
84
|
|
|
84
85
|
def __init__(self, runtime: EngineRuntimeInterface):
|
|
85
86
|
self.runtime = runtime
|
|
@@ -103,6 +104,12 @@ class Engine:
|
|
|
103
104
|
service = self.runtime.get_service(code=node.code, version=node.version)
|
|
104
105
|
return callback_data, service.callback_lock_retryable(callback_data=callback_data.data)
|
|
105
106
|
|
|
107
|
+
def _callback_lock_retry_delay(self, retry_count: int) -> int:
|
|
108
|
+
delay_range = self.CALLBACK_LOCK_RETRY_DELAY_RANGES[
|
|
109
|
+
min(retry_count, len(self.CALLBACK_LOCK_RETRY_DELAY_RANGES) - 1)
|
|
110
|
+
]
|
|
111
|
+
return random.randint(*delay_range)
|
|
112
|
+
|
|
106
113
|
# api
|
|
107
114
|
def run_pipeline(
|
|
108
115
|
self,
|
|
@@ -1045,10 +1052,13 @@ class Engine:
|
|
|
1045
1052
|
)
|
|
1046
1053
|
return
|
|
1047
1054
|
|
|
1048
|
-
try_after = random.randint(1, 5)
|
|
1049
1055
|
retry_headers = dict(headers or {})
|
|
1050
1056
|
if schedule.type is ScheduleType.CALLBACK:
|
|
1051
|
-
|
|
1057
|
+
current_retry_count = self._schedule_lock_retry_count(headers)
|
|
1058
|
+
try_after = self._callback_lock_retry_delay(current_retry_count)
|
|
1059
|
+
retry_headers[self.CALLBACK_LOCK_RETRY_HEADER] = current_retry_count + 1
|
|
1060
|
+
else:
|
|
1061
|
+
try_after = random.randint(1, 5)
|
|
1052
1062
|
logger.info(
|
|
1053
1063
|
"root pipeline[%s] schedule(%s) lock %s with data %s fetch fail, try after %s, "
|
|
1054
1064
|
"retry_count=%s, callback_data=%s",
|
|
@@ -113,6 +113,16 @@ class Service(metaclass=ABCMeta):
|
|
|
113
113
|
:rtype: bool
|
|
114
114
|
"""
|
|
115
115
|
|
|
116
|
+
@abstractmethod
|
|
117
|
+
def callback_lock_retryable(self, callback_data=None) -> bool:
|
|
118
|
+
"""
|
|
119
|
+
回调调度锁冲突时是否允许重试
|
|
120
|
+
|
|
121
|
+
:param callback_data: 回调数据
|
|
122
|
+
:return: 是否允许重试
|
|
123
|
+
:rtype: bool
|
|
124
|
+
"""
|
|
125
|
+
|
|
116
126
|
@abstractmethod
|
|
117
127
|
def schedule_after(
|
|
118
128
|
self,
|
|
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
|
|
File without changes
|
{bamboo_engine-2.6.2 → bamboo_engine-2.6.3}/bamboo_engine/handlers/conditional_parallel_gateway.py
RENAMED
|
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
|
|
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
|