[open-ils-commits] r861 - constrictor/trunk/constrictor (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Apr 11 15:33:48 EDT 2010
Author: erickson
Date: 2010-04-11 15:33:43 -0400 (Sun, 11 Apr 2010)
New Revision: 861
Modified:
constrictor/trunk/constrictor/data.py
Log:
protect against 0-task runs
Modified: constrictor/trunk/constrictor/data.py
===================================================================
--- constrictor/trunk/constrictor/data.py 2010-04-11 14:51:35 UTC (rev 860)
+++ constrictor/trunk/constrictor/data.py 2010-04-11 19:33:43 UTC (rev 861)
@@ -83,7 +83,15 @@
def store_data(self):
end_time = time.time()
+ total_tasks = len(self.runtime_data)
+ task_counts = {}
+ task_times = 0
+ counter = 0
+ if total_tasks == 0:
+ log.log_info("No tasks were run!")
+ return
+
# close out the task set
if self.insert_data:
self.engine.execute(
@@ -95,11 +103,6 @@
)
).close()
- task_counts = {}
- task_times = 0
- total_tasks = len(self.runtime_data)
- counter = 0
-
log.log_info("Inserting %d rows of data into data store..." % total_tasks)
# insert all of the task data
More information about the open-ils-commits
mailing list