Skip to content

Commit

Permalink
Bug 1171575 - Treeherder should send pulse messages for cancel all
Browse files Browse the repository at this point in the history
  • Loading branch information
vaibhavmagarwal committed Jul 22, 2015
1 parent 2f90013 commit 8ac5050
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion schemas/resultset-action-message.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"action": {
"title": "Action",
"description": "Type of action issued on task",
"enum": ["trigger_missing_jobs", "trigger_all_talos_jobs"],
"enum": ["cancel_all", "trigger_missing_jobs", "trigger_all_talos_jobs"],
"type": "string"
},
"requester": {
Expand Down
7 changes: 7 additions & 0 deletions treeherder/model/derived/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,13 @@ def cancel_all_resultset_jobs(self, requester, resultset_id):
debug_show=self.DEBUG
)

# Sending 'cancel_all' action to pulse. Right now there is no listener
# for this, so we cannot remove 'cancel' action for each job below.
publish_resultset_action.apply_async(
args=[self.project, 'cancel_all', resultset_id, requester],
routing_key='publish_to_pulse'
)

# Notify the build systems which created these jobs...
for job in jobs:
self._job_action_event(job, 'cancel', requester)
Expand Down

0 comments on commit 8ac5050

Please sign in to comment.