From 2da7db221797a8c264e0d06344a32e24e11d1177 Mon Sep 17 00:00:00 2001 From: Vokhmin Alexey V Date: Fri, 22 Mar 2013 01:43:00 +0400 Subject: [PATCH] add comments to code --- lib/abf_worker/build_lists_publish_task_manager.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/abf_worker/build_lists_publish_task_manager.rb b/lib/abf_worker/build_lists_publish_task_manager.rb index 73854c766..3cae6d46f 100644 --- a/lib/abf_worker/build_lists_publish_task_manager.rb +++ b/lib/abf_worker/build_lists_publish_task_manager.rb @@ -238,6 +238,9 @@ module AbfWorker build_lists = build_lists.limit(50) project_ids = build_lists.pluck(:project_id).uniq + # Projects which should be removed: + # - /#{save_to_repository_id}\-#{build_for_platform_id}$/ - from repository; + # - /^(#{project_ids.join('|')})\-/ - not published in current transaction. 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('|')})\-/ }