Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ def initialize(config)
def record_uniques_key(uniques)
return if uniques.nil? || uniques == {}

size = 0
uniques.each do |key, value|
size = @adapter.add_to_queue(unique_keys_key, { f: key, ks: value.to_a }.to_json)
size = @adapter.redis.pipelined do |pipeline|
uniques.each do |key, value|
pipeline.rpush(unique_keys_key, { f: key, ks: value.to_a }.to_json)
end
end

@adapter.expire(unique_keys_key, EXPIRE_SECONDS) if uniques.length == size
@adapter.expire(unique_keys_key, EXPIRE_SECONDS) if uniques.length == size.last
rescue StandardError => e
@config.log_found_exception(__method__.to_s, e)
end
Expand Down