Skip to content
This repository has been archived by the owner on Dec 15, 2018. It is now read-only.

Commit

Permalink
Remove job_finished_handler
Browse files Browse the repository at this point in the history
Summary: Was only necessary in the migration to the new aggregated emails.

Test Plan: Unit tests

Reviewers: vishal

Reviewed By: vishal

Subscribers: dfb-reviews, reviews-dfbgrowth, christoffer

Differential Revision: https://tails.corp.dropbox.com/D91898
  • Loading branch information
kajic committed Feb 25, 2015
1 parent 5f9a84e commit 6b68f15
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
1 change: 0 additions & 1 deletion changes/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ def create_app(_read_config=True, **config):
}

app.config['EVENT_LISTENERS'] = (
('changes.listeners.mail.job_finished_handler', 'job.finished'),
('changes.listeners.mail.build_finished_handler', 'build.finished'),
('changes.listeners.green_build.build_finished_handler', 'build.finished'),
('changes.listeners.hipchat.build_finished_handler', 'build.finished'),
Expand Down
15 changes: 0 additions & 15 deletions changes/listeners/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,18 +426,3 @@ def build_finished_handler(build_id, *args, **kwargs):

if context['result'] != Result.passed:
notification_handler.send(msg, build.collection_id)


def job_finished_handler(job_id, *args, **kwargs):
"""
This handler is temporary and calls the build handler for each finished
job. A finished job does not necessarily mean that the corresponding build
has finished, but that's ok because build_finished_handler will only
proceed if all builds in a collection have finished. Additionally, in
cases where the build_finished_handler is invoked twice, once on its own
when a build finishes, and a second time when it's called by
job_finished_handler, MailNotificationHandler.send will ensure that only
one email is sent.
"""
job = Job.query.get(job_id)
build_finished_handler(job.build.id, *args, **kwargs)

0 comments on commit 6b68f15

Please sign in to comment.