~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to cronscripts/oops-prune.py

  • Committer: William Grant
  • Date: 2011-02-20 04:55:42 UTC
  • mto: This revision was merged to the branch mainline in revision 12418.
  • Revision ID: william.grant@canonical.com-20110220045542-118yed3ncqxdc7z7
Stop using txn.set_isolation_level in scripts... run() has an argument for that purpose.

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
 
43
43
            oops_directories.append(oops_dir)
44
44
 
45
 
        self.txn.set_isolation_level(ISOLATION_LEVEL_AUTOCOMMIT)
46
45
        for oops_directory in oops_directories:
47
46
            for oops_path in unwanted_oops_files(oops_directory,
48
47
                                                 40, self.logger):
55
54
 
56
55
if __name__ == '__main__':
57
56
    script = OOPSPruner('oops-prune', dbuser='oopsprune')
58
 
    script.lock_and_run()
59
 
 
 
57
    script.lock_and_run(isolation=ISOLATION_LEVEL_AUTOCOMMIT)