Commit c275dbb3 authored by Hiro's avatar Hiro 🏄
Browse files

Fix twitter parser logic

parent b15674b2
......@@ -120,14 +120,7 @@ class TwitterParser(object):
id=hid.hexdigest(), service=request['service']
)
if num_requests[0][0] > twitter_requests_limit:
log.msg(
"Discarded. Too many requests from {}.".format(
hid.hexdigest
), system="twitter parser"
)
else:
if num_requests[0][0] < twitter_requests_limit:
conn.new_request(
id=str(request['id']),
command=request['command'],
......@@ -138,6 +131,14 @@ class TwitterParser(object):
status="ONHOLD",
)
else:
log.msg(
"Discarded. Too many requests from {}.".format(
hid.hexdigest
), system="twitter parser"
)
def parse_errback(self, error):
"""
Errback if we don't/can't parse the message's content.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment