diff options
| author | Marko Kreen | 2008-04-15 13:02:47 +0000 |
|---|---|---|
| committer | Marko Kreen | 2008-04-15 13:02:47 +0000 |
| commit | 329cae98ec32cd9369cab54a3b597d50fd280562 (patch) | |
| tree | 123d6cb60abbc445926956e77d2dc0318483e36e /python/skytools | |
| parent | 3bb252361d1595e2b882c3fae9602d866a8c553b (diff) | |
more setconsumer/londiste work.
simple init/event processing/copy seems to work.
Diffstat (limited to 'python/skytools')
| -rw-r--r-- | python/skytools/scripting.py | 2 | ||||
| -rw-r--r-- | python/skytools/sqltools.py | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/python/skytools/scripting.py b/python/skytools/scripting.py index cb6ee802..3a3556a2 100644 --- a/python/skytools/scripting.py +++ b/python/skytools/scripting.py @@ -510,6 +510,8 @@ class DBScript(object): if self.looping and not self.do_single_loop: time.sleep(20) return 1 + else: + sys.exit(1) def work(self): """Here should user's processing happen. diff --git a/python/skytools/sqltools.py b/python/skytools/sqltools.py index 726f94f7..566576eb 100644 --- a/python/skytools/sqltools.py +++ b/python/skytools/sqltools.py @@ -330,7 +330,10 @@ class DBObject(object): sql = open(fn, "r").read() else: raise Exception('object not defined') - curs.execute(sql) + for stmt in skytools.parse_statements(sql): + if log: + log.debug(repr(stmt)) + curs.execute(stmt) def find_file(self): full_fn = None |
