diff options
| author | Marko Kreen | 2009-04-30 09:06:11 +0000 |
|---|---|---|
| committer | Marko Kreen | 2009-04-30 09:06:11 +0000 |
| commit | 2ffefdae51e8acb66c03afad38bcac3ecbb23d4e (patch) | |
| tree | fb04bb11ba961059a9640f1b1b068945577e4d73 /python/londiste/setup.py | |
| parent | 54b28705153b60793e1e673040acb0b67680d41d (diff) | |
londiste: cmd_execute() did not check ret_code of londiste.execute_start()
Also unify checking in both places - dont depend on exactly
'200' code from there.
Diffstat (limited to 'python/londiste/setup.py')
| -rw-r--r-- | python/londiste/setup.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/python/londiste/setup.py b/python/londiste/setup.py index efc14ea8..61f226fe 100644 --- a/python/londiste/setup.py +++ b/python/londiste/setup.py @@ -308,7 +308,11 @@ class LondisteSetup(CascadeAdmin): fname = os.path.basename(fn) sql = open(fn, "r").read() q = "select * from londiste.execute_start(%s, %s, %s, true)" - self.exec_cmd(db, q, [self.queue_name, fname, sql], commit = False) + res = self.exec_cmd(db, q, [self.queue_name, fname, sql], commit = False) + ret = res[0]['ret_code'] + if ret >= 300: + self.log.warning("Skipping execution of '%s'" % fname) + continue for stmt in skytools.parse_statements(sql): curs.execute(stmt) q = "select * from londiste.execute_finish(%s, %s)" |
