otherwise they conflict with change operations.
initial_db_name = 'node_db'
provider_location = None
+ commands_without_pidfile = CascadeAdmin.commands_without_pidfile + [
+ 'tables', 'seqs', 'missing', 'show-handlers']
+
def install_code(self, db):
self.extra_objs = [
skytools.DBSchema("londiste", sql_file = 'londiste.sql'),
local_node = None
root_node_name = None
+ commands_without_pidfile = ['status', 'node-status', 'node-info']
+
def __init__(self, svc_name, dbname, args, worker_setup = False):
skytools.AdminScript.__init__(self, svc_name, args)
self.initial_db_name = dbname
name. If class method 'cmd_' + arg exists, it is called,
otherwise error is given.
"""
+ commands_without_pidfile = {}
def __init__(self, service_name, args):
"""AdminScript init."""
skytools.DBScript.__init__(self, service_name, args)
- if self.pidfile:
- self.pidfile = self.pidfile + ".admin"
if len(self.args) < 2:
self.log.error("need command")
sys.exit(1)
+ cmd = self.args[1]
+ if cmd in self.commands_without_pidfile:
+ self.pidfile = None
+
+ if self.pidfile:
+ self.pidfile = self.pidfile + ".admin"
+
def work(self):
"""Non-looping work function, calls command function."""