mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Handling work queue missing error.
This commit is contained in:
parent
3811d288d8
commit
e15c5a358f
2 changed files with 3 additions and 3 deletions
|
@ -41,7 +41,7 @@ def main():
|
|||
data={"from": "NewsBlur Task Monitor: %s <admin@%s.newsblur.com>" % (hostname, hostname),
|
||||
"to": [admin_email],
|
||||
"subject": "%s feeds fetched falling: %s (from %s)" % (hostname, feeds_fetched, redis_task_fetches),
|
||||
"text": "Feed fetches are falling: %s (from %s)" % (feeds_fetched, redis_task_fetches)})
|
||||
"text": "Feed fetches are falling: %s (from %s) %s" % (feeds_fetched, redis_task_fetches, failed)})
|
||||
|
||||
r.set(monitor_key, feeds_fetched)
|
||||
r.expire(monitor_key, 60*60*3) # 3 hours
|
||||
|
|
|
@ -27,7 +27,7 @@ def main():
|
|||
|
||||
try:
|
||||
work_queue_size = int(r.llen("work_queue"))
|
||||
redis_work_queue = int(r_monitor.get(monitor_key))
|
||||
redis_work_queue = int(r_monitor.get(monitor_key) or 0)
|
||||
except Exception, e:
|
||||
failed = e
|
||||
|
||||
|
@ -41,7 +41,7 @@ def main():
|
|||
data={"from": "NewsBlur Queue Monitor: %s <admin@%s.newsblur.com>" % (hostname, hostname),
|
||||
"to": [admin_email],
|
||||
"subject": "%s work queue rising: %s (from %s)" % (hostname, work_queue_size, redis_work_queue),
|
||||
"text": "Work queue is rising: %s (from %s)" % (work_queue_size, redis_work_queue)})
|
||||
"text": "Work queue is rising: %s (from %s) %s" % (work_queue_size, redis_work_queue, failed)})
|
||||
|
||||
r_monitor.set(monitor_key, work_queue_size)
|
||||
r_monitor.expire(monitor_key, 60*60*3) # 3 hours
|
||||
|
|
Loading…
Add table
Reference in a new issue