~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to database/replication/slon_ctl.py

  • Committer: Jelmer Vernooij
  • Date: 2011-09-21 14:28:02 UTC
  • mfrom: (14006 devel)
  • mto: This revision was merged to the branch mainline in revision 14010.
  • Revision ID: jelmer@canonical.com-20110921142802-7ggkc204igsy532w
MergeĀ lp:launchpad

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/python -S
2
2
#
3
 
# Copyright 2009 Canonical Ltd.  This software is licensed under the
 
3
# Copyright 2009-2011 Canonical Ltd.  This software is licensed under the
4
4
# GNU Affero General Public License version 3 (see the file LICENSE).
5
5
 
6
6
"""Startup and shutdown slon processes.
9
9
/etc/init.d/slony1 script instead of this tool.
10
10
"""
11
11
 
12
 
import _pythonpath
13
 
 
 
12
from optparse import OptionParser
14
13
import os.path
15
14
import subprocess
16
15
import sys
17
 
from optparse import OptionParser
 
16
 
 
17
import _pythonpath
 
18
import replication.helpers
18
19
 
19
20
from canonical.config import config
20
21
from canonical.database.sqlbase import connect
21
 
from canonical.launchpad.scripts import logger, logger_options
22
 
import replication.helpers
 
22
from canonical.launchpad.scripts import (
 
23
    logger,
 
24
    logger_options,
 
25
    )
 
26
 
23
27
 
24
28
__metaclass__ = type
25
29
__all__ = []
131
135
def stop(log, nodes):
132
136
    for node in nodes:
133
137
        pidfile = get_pidfile(node.nickname)
134
 
        logfile = get_logfile(node.nickname)
135
138
 
136
139
        if not os.path.exists(pidfile):
137
140
            log.info(