Prevent topic_retriever from retrieving more than once a minute

This commit is contained in:
Robin Ward 2016-11-16 12:04:16 -05:00
parent 036954d5b4
commit 67e2041691
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ class TopicRetriever
return false if @opts[:no_throttle]
# Throttle other users to once every 60 seconds
retrieved_key = "retrieved:#{@embed_url}"
retrieved_key = "retrieved_topic"
if $redis.setnx(retrieved_key, "1")
$redis.expire(retrieved_key, 60)
return false