Open
Description
user_ids,org,delete_restore = get_org_and_user(delete_restore_id)
return unless user_ids.present?
work_num = [user_ids.length,50].min
thread_pool = Concurrent::FixedThreadPool.new(work_num)
error_map = Concurrent::Map.new
redis_key = RedisClient::DDRS_BULK_DELETE_KEY % org.id ## TODO
set_redis_total_num(redis_key,user_ids.length)
user_ids.each do |id|
thread_pool.post do
#delete_single_user(id,error_map,redis_key)
target_class = ClassFactory.create_dynamic_model("zendmodo", "privacy_settings", true)
puts id
puts target_class
end
end
thread_pool.shutdown
thread_pool.wait_for_termination
the wait_for_termination method will stuck the following code
target_class = ClassFactory.create_dynamic_model("zendmodo", "privacy_settings", true)
- Operating system: linux
- Ruby implementation: Ruby
concurrent-ruby
version: 1.2.0concurrent-ruby-ext
installed: noconcurrent-ruby-edge
used: no
Metadata
Metadata
Assignees
Labels
No labels