Skip to content

Commit

Permalink
fix: 取消signal()的providing_args参数传入 TencentBlueKing#1464
Browse files Browse the repository at this point in the history
  • Loading branch information
huangpixu committed Jan 3, 2025
1 parent e2e2014 commit db56b2e
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 25 deletions.
4 changes: 2 additions & 2 deletions itsm/trigger/signal/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@

# 统一用一个信号来接收,然后统一分配具体的事项
trigger_signal = TriggerSignal()
action_finish = Signal(providing_args=("action_id", "result", "error_message"))
post_action_finish = Signal(providing_args=("instance",))
action_finish = Signal() # providing_args=("action_id", "result", "error_message")
post_action_finish = Signal() # providing_args=("instance",)
4 changes: 2 additions & 2 deletions itsm/workflow/signals/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@

from django.dispatch import Signal

state_created = Signal(providing_args=["flow_id", "state_id", "state_type"])
state_deleted = Signal(providing_args=["flow_id", "state_id"])
state_created = Signal() # providing_args=["flow_id", "state_id", "state_type"]
state_deleted = Signal() # providing_args=["flow_id", "state_id"]
10 changes: 7 additions & 3 deletions pipeline/contrib/periodic_task/signals/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@

from django.dispatch import Signal

pre_periodic_task_start = Signal(providing_args=["periodic_task", "pipeline_instance"])
post_periodic_task_start = Signal(providing_args=["periodic_task", "pipeline_instance"])
periodic_task_start_failed = Signal(providing_args=["periodic_task", "history"])
pre_periodic_task_start = (
Signal()
) # providing_args=["periodic_task", "pipeline_instance"]
post_periodic_task_start = (
Signal()
) # providing_args=["periodic_task", "pipeline_instance"]
periodic_task_start_failed = Signal() # providing_args=["periodic_task", "history"]
2 changes: 1 addition & 1 deletion pipeline/core/flow/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@

from django.dispatch import Signal

post_new_end_event_register = Signal(providing_args=["node_type", "node_cls"])
post_new_end_event_register = Signal() # providing_args=["node_type", "node_cls"]
2 changes: 1 addition & 1 deletion pipeline/core/signals/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@

from django.dispatch import Signal

pre_variable_register = Signal(providing_args=["variable_code"])
pre_variable_register = Signal() # providing_args=["variable_code"]
46 changes: 30 additions & 16 deletions pipeline/engine/signals/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,37 @@

from django.dispatch import Signal

pipeline_ready = Signal(providing_args=["process_id"])
pipeline_end = Signal(providing_args=["root_pipeline_id"])
pipeline_revoke = Signal(providing_args=["root_pipeline_id"])
child_process_ready = Signal(providing_args=["child_id"])
process_ready = Signal(providing_args=["parent_id", "current_node_id", "call_from_child"])
batch_process_ready = Signal(providing_args=["process_id_list", "pipeline_id"])
wake_from_schedule = Signal(providing_args=["process_id, activity_id"])
schedule_ready = Signal(providing_args=["schedule_id", "countdown", "process_id", "data_id"])
process_unfreeze = Signal(providing_args=["process_id"])
pipeline_ready = Signal() # providing_args=("process_id",)
pipeline_end = Signal() # providing_args=("root_pipeline_id",)
pipeline_revoke = Signal() # providing_args=("root_pipeline_id",)
child_process_ready = Signal() # providing_args=("child_id",)
process_ready = (
Signal()
) # providing_args=("parent_id", "current_node_id", "call_from_child",)
batch_process_ready = Signal() # providing_args=("process_id_list", "pipeline_id",)
wake_from_schedule = Signal() # providing_args=("process_id", "activity_id",)
schedule_ready = (
Signal()
) # providing_args=("schedule_id", "countdown", "process_id", "data_id",)
process_unfreeze = Signal() # providing_args=("process_id",)
# activity failed signal
activity_failed = Signal(providing_args=["pipeline_id", "pipeline_activity_id", "subprocess_id_stack"])
activity_failed = (
Signal()
) # providing_args=("pipeline_id", "pipeline_activity_id", "subprocess_id_stack",)

# signal for developer (do not use valve to pass them!)
service_schedule_fail = Signal(providing_args=["activity_shell", "schedule_service", "ex_data"])
service_schedule_success = Signal(providing_args=["activity_shell", "schedule_service"])
node_skip_call = Signal(providing_args=["process", "node"])
node_retry_ready = Signal(providing_args=["process", "node"])
service_schedule_fail = (
Signal()
) # providing_args=("activity_shell", "schedule_service", "ex_data",)
service_schedule_success = (
Signal()
) # providing_args=("activity_shell", "schedule_service",)
node_skip_call = Signal() # providing_args=("process", "node",)
node_retry_ready = Signal() # providing_args=("process", "node",)

service_activity_timeout_monitor_start = Signal(providing_args=["node_id", "version", "root_pipeline_id", "countdown"])
service_activity_timeout_monitor_end = Signal(providing_args=["node_id", "version"])
service_activity_timeout_monitor_start = (
Signal()
) # providing_args=("node_id", "version", "root_pipeline_id", "countdown",)
service_activity_timeout_monitor_end = (
Signal()
) # providing_args=("node_id", "version",)

0 comments on commit db56b2e

Please sign in to comment.