zulip/zerver/worker
Steve Howell 5904f2eb8d Avoid locks between logging slow queries.
Use the commit_on_success() context manager around the call
to internal_send_message() inside of SlowQueryWorker's polling
loop, so that the pending SELECT statement from
get_status_dict_by_realm() gets committed.  If we don't do
this, postgres will hold locks on zerver_userprofile, and other
tables, for a long time, which can interfere with migrations.

This is an interim solution until we switch postgres's default
commit behavior.  Right now the default transaction isolation
is "read committed," so SELECT statements lead to AccessShareLocks
that do no get closed until the transaction finishes.

(imported from commit f72aeffbbe71a731e327459f15bd7dbebaf9e0b8)
2013-10-16 11:34:41 -04:00
..
__init__.py Add new system for defining and running queue-processing workers 2013-09-24 20:44:15 -04:00
queue_processors.py Avoid locks between logging slow queries. 2013-10-16 11:34:41 -04:00