~ccx/txpostgres/notify

Viewing all changes in revision 11.

  • Committer: Jan Urbański
  • Date: 2010-06-01 22:53:40 UTC
  • Revision ID: git-v1:04b9472f217a7c209a23aa2693ae5f7e8fb04e0f
Fix a race condition in runQuery

The connection lock needs to be held until after fetchall() has been
called on the asynchronous cursor in the Connection.runQuery
method. Original coding released the lock after running execute() and
this made it possible to start another execute() before the callback
calling fetchall() has been fired. Subsequent firing of that callback
gave errors, because you cannot use fetchall() when there is another
query underway.

Give exact reason for skipping the test in case of DB connection
failure.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: