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('|')})\-/ }