summaryrefslogtreecommitdiff
path: root/queue/zset/add.rb
blob: 2c778a41cbeaef6091af91b078110948c2082298 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/ruby
#
# Add the same three tests over and over again.
#
#
require "redis"

@redis = Redis.new(:host => "127.0.0.1")


x = []

x.push( "test 1" )
x.push( "test 2" )
x.push( "test 3" )


for i in 0 .. 10 
    x.each do |test|
      puts "adding #{test}"
      @redis.zadd('zset', Time.now.to_i, test)
    end
    sleep 1
end