Commit ad9956b9 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

periodicity is not global for all partition

parent 56e1c7bf
...@@ -651,11 +651,12 @@ class Slapgrid(object): ...@@ -651,11 +651,12 @@ class Slapgrid(object):
getSoftwareUrlHash(software_url)) getSoftwareUrlHash(software_url))
# Get periodicity from periodicity file if not forced # Get periodicity from periodicity file if not forced
periodicity = self.maximum_periodicity
if not self.force_periodicity: if not self.force_periodicity:
periodicity_path = os.path.join(software_path,'periodicity') periodicity_path = os.path.join(software_path,'periodicity')
if os.path.exists(periodicity_path): if os.path.exists(periodicity_path):
try: try:
self.maximum_periodicity = int(open(periodicity_path).read()) periodicity = int(open(periodicity_path).read())
except ValueError: except ValueError:
os.remove(periodicity_path) os.remove(periodicity_path)
exception = traceback.format_exc() exception = traceback.format_exc()
...@@ -670,7 +671,7 @@ class Slapgrid(object): ...@@ -670,7 +671,7 @@ class Slapgrid(object):
if timestamp: if timestamp:
try: try:
if int(timestamp) <= int(old_timestamp): if int(timestamp) <= int(old_timestamp):
if int(time.time()) <= (last_runtime + self.maximum_periodicity) : if int(time.time()) <= (last_runtime + periodicity) :
continue continue
except ValueError: except ValueError:
os.remove(timestamp_path) os.remove(timestamp_path)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment