diff options
author | Benjamin Saller <bcsaller@objectrealms.net> | 2007-05-22 18:13:36 (GMT) |
---|---|---|
committer | Benjamin Saller <bcsaller@objectrealms.net> | 2007-05-22 18:13:36 (GMT) |
commit | caa92027df1f7c72de7975e64943d19fb780fc0e (patch) | |
tree | 6dc9990db23ffd2b4958ed3419ffecc8af0341fe /bin | |
parent | 6914ec4e436e247d3d1cf6aeb0385f8377cf4cf3 (diff) |
try harder to shutdown properly
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/datastore | 4 | ||||
-rwxr-xr-x | bin/datastore-service | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/bin/datastore b/bin/datastore index 52d5bd5..679df98 100755 --- a/bin/datastore +++ b/bin/datastore @@ -46,7 +46,9 @@ class DataStoreApplication(Application): signal.signal(signal.SIGHUP, handle_shutdown) signal.signal(signal.SIGTERM, handle_shutdown) - self.eventloop.run() + try: + self.eventloop.run() + except: self.ds.stop() dsa = DataStoreApplication("datastore") dsa.plugins.append('ore.main.profile_support.ProfileSupport') diff --git a/bin/datastore-service b/bin/datastore-service index 93f9167..981e06d 100755 --- a/bin/datastore-service +++ b/bin/datastore-service @@ -48,7 +48,9 @@ signal.signal(signal.SIGTERM, handle_shutdown) def main(): try: mainloop.run() - except KeyboardInterrupt: logger.info("DataStore shutdown by user") + except KeyboardInterrupt: + ds.stop() + logger.info("DataStore shutdown by user") except: ds.stop() logger.debug("Datastore shutdown with error", |