summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Plugins/Snapshots.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Server/Plugins/Snapshots.py')
-rw-r--r--src/lib/Server/Plugins/Snapshots.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/Server/Plugins/Snapshots.py b/src/lib/Server/Plugins/Snapshots.py
index 315dc34c0..3b2949e7a 100644
--- a/src/lib/Server/Plugins/Snapshots.py
+++ b/src/lib/Server/Plugins/Snapshots.py
@@ -59,8 +59,11 @@ class Snapshots(Bcfg2.Server.Plugin.Statistics,
self.loader.start()
def load_snapshot(self):
- while True:
- (metadata, data) = self.work_queue.get(block=True)
+ while self.running:
+ try:
+ (metadata, data) = self.work_queue.get(block=True, timeout=5)
+ except:
+ continue
self.statistics_from_old_stats(metadata, data)
def process_statistics(self, metadata, data):