~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to database/replication/repair-restored-db.py

  • Committer: Steve Kowalik
  • Date: 2011-08-07 04:05:52 UTC
  • mto: This revision was merged to the branch mainline in revision 13626.
  • Revision ID: stevenk@ubuntu.com-20110807040552-mwnxo0flmhvl35e8
Correct the notification based on review comments, and remove request{,ed}
from the function names, switching to create{,d}.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
import psycopg2
27
27
 
28
 
from lp.services.config import config
29
 
from lp.services.database.postgresql import ConnectionString
30
 
from lp.services.database.sqlbase import (
31
 
    connect,
32
 
    ISOLATION_LEVEL_AUTOCOMMIT,
33
 
    quote,
34
 
    )
35
 
from lp.services.scripts import (
36
 
    db_options,
37
 
    logger,
38
 
    logger_options,
39
 
    )
 
28
from canonical.config import config
 
29
from canonical.database.postgresql import ConnectionString
 
30
from canonical.database.sqlbase import (
 
31
    connect, quote, ISOLATION_LEVEL_AUTOCOMMIT)
 
32
from canonical.launchpad.scripts import db_options, logger_options, logger
 
33
 
40
34
import replication.helpers
41
35
 
42
36
 
51
45
 
52
46
    log = logger(options)
53
47
 
54
 
    con = connect(isolation=ISOLATION_LEVEL_AUTOCOMMIT)
 
48
    con = connect(options.dbuser, isolation=ISOLATION_LEVEL_AUTOCOMMIT)
55
49
 
56
50
    if not replication.helpers.slony_installed(con):
57
51
        log.info("Slony-I not installed. Nothing to do.")