slow_queries: Log slow queries even if not reported via Zulip.

This should help make these logs more useful for debugging on an
arbitary Zulip system.
This commit is contained in:
Tim Abbott 2017-09-22 14:07:57 -07:00
parent ec61a070b4
commit 84926ff321
1 changed files with 3 additions and 0 deletions

View File

@ -315,6 +315,9 @@ class SlowQueryWorker(QueueProcessingWorker):
# type: () -> None
slow_queries = self.q.drain_queue("slow_queries", json=True)
for query in slow_queries:
logging.info("Slow query: %s" % (query))
if settings.ERROR_BOT is None:
return