Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorBenjamin Saller <bcsaller@objectrealms.net>2007-05-22 18:13:36 (GMT)
committer Benjamin Saller <bcsaller@objectrealms.net>2007-05-22 18:13:36 (GMT)
commitcaa92027df1f7c72de7975e64943d19fb780fc0e (patch)
tree6dc9990db23ffd2b4958ed3419ffecc8af0341fe /bin
parent6914ec4e436e247d3d1cf6aeb0385f8377cf4cf3 (diff)
try harder to shutdown properly
Diffstat (limited to 'bin')
-rwxr-xr-xbin/datastore4
-rwxr-xr-xbin/datastore-service4
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",