Created
November 29, 2013 22:18
-
-
Save richardking/7712720 to your computer and use it in GitHub Desktop.
games array script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @old_key = nil | |
| 10000.times do | |
| puts "-- #{Time.now} --" | |
| if @old_key | |
| puts "OLD KEY #{@old_key}" | |
| puts "OLD KEY RESULTS: #{REDIS.zrangebyscore(@old_key, 10.hours.ago.to_i, (Time.now+10.days).to_i).count}" | |
| end | |
| key = Score.league_cache_key("NCAAFB", "Football") | |
| game_key = REDIS.get(key) | |
| @old_key = game_key | |
| puts game_key | |
| xx = REDIS.zrangebyscore(game_key, 10.hours.ago.to_i, (Time.now+10.days).to_i).count | |
| if xx == 0 | |
| puts "ZERO" | |
| else | |
| puts xx | |
| end | |
| sleep(1) | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment