Skip to content

Commit

Permalink
remove redis deprecated commands warning
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Mar 16, 2022
1 parent a505c57 commit 29240aa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/ncbo_annotator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -465,12 +465,13 @@ def annotate_direct(text, options={})
redis_data = Hash.new
cur_inst = redis_current_instance()

redis.pipelined {
redis.pipelined do |pipeline|
rawAnnotations.each do |ann|
id = get_prefixed_id(cur_inst, ann.string_id)
redis_data[id] = { future: redis.hgetall(id) }
redis_data[id] = { future: pipeline.hgetall(id) }
end
}
end

sleep(1.0 / 150.0)
redis_data.each do |k, v|
while v[:future].value.is_a?(Redis::FutureNotReady)
Expand Down

0 comments on commit 29240aa

Please sign in to comment.