#960: unlock repository when main build list does not exist

This commit is contained in:
Vokhmin Alexey V 2013-03-01 00:03:22 +04:00
parent c257513216
commit 508ef2dbe8
1 changed files with 6 additions and 1 deletions

View File

@ -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)