~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/services/scripts/base.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-09-19 23:43:35 UTC
  • mfrom: (13970.10.13 ztm-murder)
  • Revision ID: launchpad@pqm.canonical.com-20110919234335-wl2iifzeioub5uhc
[r=sinzui][no-qa] Stripped of its transaction management
 functionality,
 ZopelessTransactionManager is demoted to a mere database configuration
 manager.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
    LockAlreadyAcquired,
31
31
    )
32
32
import pytz
 
33
import transaction
33
34
from zope.component import getUtility
34
35
 
35
36
from canonical.config import config, dbconfig
359
360
        if dbuser is None:
360
361
            connstr = ConnectionString(dbconfig.main_master)
361
362
            dbuser = connstr.user or dbconfig.dbuser
362
 
        self.txn = ZopelessTransactionManager.initZopeless(
 
363
        ZopelessTransactionManager.initZopeless(
363
364
            dbuser=dbuser, isolation=isolation)
 
365
        self.txn = transaction
364
366
 
365
367
    def record_activity(self, date_started, date_completed):
366
368
        """Hook to record script activity."""