~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/canonical/database/sqlbase.py

  • Committer: William Grant
  • Date: 2011-09-24 02:32:44 UTC
  • mto: (14022.3.12 death-of-ztm)
  • mto: This revision was merged to the branch mainline in revision 14029.
  • Revision ID: william.grant@canonical.com-20110924023244-a8vo0fo2f6nxpan5
sendmail no longer depends on ZopelessTransactionManager. It uses a module global instead of a class member, and ZTM sets that global.

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
 
60
60
from canonical.config import dbconfig
61
61
from canonical.database.interfaces import ISQLBase
 
62
from lp.services.mail.sendmail import set_immediate_mail_delivery
62
63
from lp.services.propertycache import clear_property_cache
63
64
 
64
65
# Default we want for scripts, and the PostgreSQL default. Note psycopg1 will
289
290
        cls._isolation = isolation
290
291
        cls._reset_stores()
291
292
        cls._installed = cls
 
293
        set_immediate_mail_delivery(True)
292
294
 
293
295
    @staticmethod
294
296
    def _reset_stores():
329
331
        dbconfig.override(dbuser=None, isolation_level=None)
330
332
        cls._reset_stores()
331
333
        cls._installed = None
 
334
        set_immediate_mail_delivery(False)
332
335
 
333
336
 
334
337
def clear_current_connection_cache():