mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Skipping push feeds pushed within last 60 seconds.
This commit is contained in:
parent
2b3ff6d2b4
commit
67520cca4a
1 changed files with 1 additions and 0 deletions
|
@ -47,6 +47,7 @@ def push_callback(request, push_id):
|
|||
if latest_push_date > datetime.datetime.now() - datetime.timedelta(minutes=1):
|
||||
latest_push_date_delta = datetime.datetime.now() - latest_push_date
|
||||
logging.debug(' ---> [%-30s] ~FBSkipping feed fetch, pushed %s seconds ago' % (unicode(subscription.feed)[:30], latest_push_date_delta.seconds))
|
||||
return HttpResponse('Slow down, you just pushed %s seconds ago...' % latest_push_date_delta.seconds)
|
||||
|
||||
# XXX TODO: Optimize this by removing feedparser. It just needs to find out
|
||||
# the hub_url or topic has changed. ElementTree could do it.
|
||||
|
|
Loading…
Add table
Reference in a new issue