Change order of operation so that we do not attempt
to lock the same mutex twice in a row.
Change-Id: I1f874d720e2b66d9b272be0202482b22d24ef2b2
JIRA: STORPERF-42
Signed-off-by: Mark Beierl <mark.beierl@emc.com>
(cherry picked from commit
6d800137f9756f94b3d3749faf007564c9713dee)
"""
Records the start time for the given workload
"""
+
+ if (self.job_id is None):
+ self.create_job_id()
+
with db_mutex:
- if (self.job_id is None):
- self.create_job_id()
db = sqlite3.connect(JobDB.db_name)
cursor = db.cursor()
"""
Records the end time for the given workload
"""
+ if (self.job_id is None):
+ self.create_job_id()
+
with db_mutex:
- if (self.job_id is None):
- self.create_job_id()
db = sqlite3.connect(JobDB.db_name)
cursor = db.cursor()