From 915204a66fd66e0eef5bdde64c0916c2f3f45199 Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Thu, 21 Mar 2013 21:37:13 +0400 Subject: [PATCH] small refactoring according to Alexander's comment --- lib/abf_worker/build_lists_publish_task_manager.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/abf_worker/build_lists_publish_task_manager.rb b/lib/abf_worker/build_lists_publish_task_manager.rb index 4ec75ea8a..73854c766 100644 --- a/lib/abf_worker/build_lists_publish_task_manager.rb +++ b/lib/abf_worker/build_lists_publish_task_manager.rb @@ -237,7 +237,7 @@ module AbfWorker build_lists = build_lists.where('build_lists.id NOT IN (?)', locked_ids) unless locked_ids.empty? build_lists = build_lists.limit(50) - project_ids = build_lists.map(&:project_id).uniq + project_ids = build_lists.pluck(:project_id).uniq projects_for_cleanup = @redis.lrange(PROJECTS_FOR_CLEANUP, 0, -1). select{ |k| k =~ /#{save_to_repository_id}\-#{build_for_platform_id}$/ && k !~ /^(#{project_ids.join('|')})\-/ }