Skip to content

Commit e055586

Browse files
committed
Add source_channel to Orquesta context
1 parent f067176 commit e055586

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

contrib/runners/orquesta_runner/orquesta_runner/orquesta_runner.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ def _construct_st2_context(self):
7676
if self.execution.context.get('api_user'):
7777
st2_ctx['st2']['api_user'] = self.execution.context.get('api_user')
7878

79+
if self.execution.context.get('source_channel'):
80+
st2_ctx['st2']['source_channel'] = self.execution.context.get('source_channel')
81+
7982
if self.execution.context:
8083
st2_ctx['parent'] = self.execution.context
8184

st2common/st2common/services/workflows.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,9 @@ def request_action_execution(wf_ex_db, task_ex_db, st2_ctx, ac_ex_req, delay=Non
568568
if st2_ctx.get('api_user'):
569569
ac_ex_ctx['api_user'] = st2_ctx.get('api_user')
570570

571+
if st2_ctx.get('source_channel'):
572+
ac_ex_ctx['source_channel'] = st2_ctx.get('source_channel')
573+
571574
if item_id is not None:
572575
ac_ex_ctx['orquesta']['item_id'] = item_id
573576

@@ -921,6 +924,9 @@ def request_next_tasks(wf_ex_db, task_ex_id=None):
921924
if root_st2_ctx.get('api_user'):
922925
st2_ctx['api_user'] = root_st2_ctx.get('api_user')
923926

927+
if root_st2_ctx.get('source_channel'):
928+
st2_ctx['source_channel'] = root_st2_ctx.get('source_channel')
929+
924930
# Request the task execution.
925931
request_task_execution(wf_ex_db, st2_ctx, task)
926932
except Exception as e:

0 commit comments

Comments
 (0)