diff options
author | Marko Kreen | 2008-02-28 10:01:09 +0000 |
---|---|---|
committer | Marko Kreen | 2008-02-28 10:01:09 +0000 |
commit | 8d358469aee6dab496e2b00e60b8843c1eec97c1 (patch) | |
tree | ec2b52ddd14c74785b5e5aad52b212205fc4fe59 /python/pgqadm.py | |
parent | cb88da31a88004b592228a99169ce77082863987 (diff) |
pgqadm avoid queue_ prefix from -stable
Diffstat (limited to 'python/pgqadm.py')
-rwxr-xr-x | python/pgqadm.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/python/pgqadm.py b/python/pgqadm.py index b436efd6..9ae9c0a0 100755 --- a/python/pgqadm.py +++ b/python/pgqadm.py @@ -132,7 +132,10 @@ class PGQAdmin(skytools.DBScript): for el in self.args[3:]: k, v = el.split('=') if k not in config_allowed_list: - raise Exception('unknown config var: '+k) + qk = "queue_" + k + if qk not in config_allowed_list: + raise Exception('unknown config var: '+k) + k = qk expr = "%s=%s" % (k, skytools.quote_literal(v)) alist.append(expr) self.log.info('Change queue %s config to: %s' % (qname, ", ".join(alist))) @@ -164,9 +167,16 @@ class PGQAdmin(skytools.DBScript): res = curs.dictfetchone() db.commit() + if res is None: + print "no such queue:", qname + return + print qname for k in config_allowed_list: - print " %s\t=%7s" % (k, res[k]) + n = k + if k[:6] == "queue_": + n = k[6:] + print " %s\t=%7s" % (n, res[k]) def get_queue_list(self): db = self.get_database('db') |