From 14a32fdfc9026838a0f30b603accb84367c27a94 Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Tue, 12 Feb 2013 15:00:59 +0400 Subject: [PATCH] #922: update PublishObserver --- lib/abf_worker/publish_observer.rb | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/abf_worker/publish_observer.rb b/lib/abf_worker/publish_observer.rb index a4bafb737..d6e61a9ae 100644 --- a/lib/abf_worker/publish_observer.rb +++ b/lib/abf_worker/publish_observer.rb @@ -35,15 +35,20 @@ module AbfWorker case status when COMPLETED build_list.published - AbfWorker::BuildListsPublishTaskManager.cleanup_completed options['projects_for_cleanup'] when FAILED, CANCELED build_list.fail_publish - AbfWorker::BuildListsPublishTaskManager.cleanup_failed options['projects_for_cleanup'] end AbfWorker::BuildListsPublishTaskManager.unlock_build_list build_list end - build_list = build_lists.first || subject - AbfWorker::BuildListsPublishTaskManager.unlock_rep_and_platform build_list + + case status + when COMPLETED + AbfWorker::BuildListsPublishTaskManager.cleanup_completed options['projects_for_cleanup'] + when FAILED, CANCELED + AbfWorker::BuildListsPublishTaskManager.cleanup_failed options['projects_for_cleanup'] + end + + AbfWorker::BuildListsPublishTaskManager.unlock_rep_and_platform(build_lists.first || subject) end def update_results(build_list = subject)