Skip to content

Commit e3276f3

Browse files
committed
CH-185 On-exit strategy add custom image parameter
1 parent a54565b commit e3276f3

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

docs/applications/development/workflows-api.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,18 @@ op = operations.ParallelOperation(..., on_exit_notify=on_exit_notify)
247247

248248
Synchronous operation types use this mechanism to wait for the result and get the value.
249249

250+
To customize the onExit strategy an additional `image` parameter can be specified.
251+
252+
```Python
253+
import json
254+
on_exit_notify={
255+
'queue': 'my_queue',
256+
'payload': json.dumps({'insert': 1})
257+
'image': "my-image"
258+
}
259+
op = operations.ParallelOperation(..., on_exit_notify=on_exit_notify)
260+
```
261+
250262
## Free template customization
251263

252264
To customize the task beyond the Task api, use

libraries/cloudharness-common/cloudharness/workflows/operations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def add_on_exit_notify_handler(self, spec):
168168
payload = self.on_exit_notify['payload']
169169
exit_task = CustomTask(
170170
name="exit-handler",
171-
image_name='workflows-notify-queue',
171+
image_name=self.on_exit_notify('image', 'workflows-notify-queue'),
172172
workflow_result='{{workflow.status}}',
173173
queue_name=queue,
174174
payload=payload

0 commit comments

Comments
 (0)