Commit 74ef00ab authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_cloud: bang_timestamp precision was increased

    Ensure the implementation is consistent with the precision (1e6) otherwise partition modification date will never
    ever be larger, when compared.
parent 3bc4717d
...@@ -183,9 +183,9 @@ class SoftwareInstance(Item): ...@@ -183,9 +183,9 @@ class SoftwareInstance(Item):
compute_partition = self.getAggregateValue(portal_type="Compute Partition") compute_partition = self.getAggregateValue(portal_type="Compute Partition")
if compute_partition is None: if compute_partition is None:
raise ValueError("Instance isn't allocated to call _asParamterDict") raise ValueError("Instance isn't allocated to call _asParamterDict")
timestamp = int(compute_partition.getModificationDate()) timestamp = int(float(compute_partition.getModificationDate()) * 1e6)
newtimestamp = int(self.getBangTimestamp(int(self.getModificationDate()))) newtimestamp = int(self.getBangTimestamp(int(float(self.getModificationDate()) * 1e6)))
if (newtimestamp > timestamp): if (newtimestamp > timestamp):
timestamp = newtimestamp timestamp = newtimestamp
......
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