~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to database/schema/preflight.py

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-12-09 09:23:38 UTC
  • mfrom: (14333.2.13 history-model)
  • Revision ID: launchpad@pqm.canonical.com-20111209092338-se7u5l0skqzaes1v
[r=jcsackett][bug=295214, 894836,
 898200] Keep sort button ob bug listing pages in sync with the
 displayed data

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 
5
5
"""Confirm the database systems are ready to be patched as best we can."""
6
6
 
 
7
import _pythonpath
 
8
 
7
9
__all__ = [
8
10
    'DatabasePreflight',
9
11
    'KillConnectionsPreflight',
10
12
    'NoConnectionCheckPreflight',
11
13
    ]
12
14
 
13
 
import _pythonpath
14
15
 
15
16
from datetime import timedelta
16
17
from optparse import OptionParser
19
20
 
20
21
import psycopg2
21
22
 
22
 
from lp.services.database.sqlbase import (
 
23
from canonical.database.sqlbase import (
23
24
    connect,
24
25
    ISOLATION_LEVEL_AUTOCOMMIT,
25
26
    sqlvalues,
26
27
    )
27
 
from lp.services.scripts import (
 
28
from canonical.launchpad.scripts import (
28
29
    db_options,
29
30
    logger,
30
31
    logger_options,
32
33
import replication.helpers
33
34
import upgrade
34
35
 
 
36
 
35
37
# Ignore connections by these users.
36
38
SYSTEM_USERS = frozenset(['postgres', 'slony', 'nagios', 'lagmon'])
37
39