From 508ef2dbe84b7b5c6d51aa34e2d57c554962f219 Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Fri, 1 Mar 2013 00:03:22 +0400 Subject: [PATCH] #960: unlock repository when main build list does not exist --- lib/abf_worker/publish_observer.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/abf_worker/publish_observer.rb b/lib/abf_worker/publish_observer.rb index a069acb72..8e845e6a2 100644 --- a/lib/abf_worker/publish_observer.rb +++ b/lib/abf_worker/publish_observer.rb @@ -50,7 +50,12 @@ module AbfWorker AbfWorker::BuildListsPublishTaskManager.cleanup_failed options['projects_for_cleanup'] end - AbfWorker::BuildListsPublishTaskManager.unlock_rep_and_platform(build_lists.first || subject) + bl = build_lists.first || subject + if !bl && options['projects_for_cleanup'].present? + pr, rep, pl = options['projects_for_cleanup'][0].split('-') + bl = BuildList.where(:build_for_platform_id => pl, :save_to_repository_id => rep).first + end + AbfWorker::BuildListsPublishTaskManager.unlock_rep_and_platform bl end def update_results(build_list = subject)