Commit 303a1189 authored by Romain Courteaud's avatar Romain Courteaud Committed by Łukasz Nowak

Improve timestamp.

Basically it reuses bang timestamp, which is controllable property, unlike
getModificationDate
parent 9633333b
...@@ -953,7 +953,7 @@ class SlapTool(BaseTool): ...@@ -953,7 +953,7 @@ class SlapTool(BaseTool):
computer_partition = software_instance.getAggregateValue(portal_type="Computer Partition") computer_partition = software_instance.getAggregateValue(portal_type="Computer Partition")
timestamp = int(computer_partition.getModificationDate()) timestamp = int(computer_partition.getModificationDate())
newtimestamp = int(software_instance.getModificationDate()) newtimestamp = int(software_instance.getBangTimestamp(int(software_instance.getModificationDate())))
if (newtimestamp > timestamp): if (newtimestamp > timestamp):
timestamp = newtimestamp timestamp = newtimestamp
...@@ -980,8 +980,8 @@ class SlapTool(BaseTool): ...@@ -980,8 +980,8 @@ class SlapTool(BaseTool):
'xml': slave_instance.getTextContent(), 'xml': slave_instance.getTextContent(),
'connection_xml': slave_instance.getConnectionXml(), 'connection_xml': slave_instance.getConnectionXml(),
}) })
newtimestamp = int(slave_instance.getModificationDate()) newtimestamp = int(slave_instance.getBangTimestamp(int(software_instance.getModificationDate())))
if (newtimestamp > timestamp): if (newtimestamp > timestamp):
timestamp = newtimestamp timestamp = newtimestamp
return { return {
'xml': software_instance.getTextContent(), 'xml': software_instance.getTextContent(),
...@@ -992,7 +992,7 @@ class SlapTool(BaseTool): ...@@ -992,7 +992,7 @@ class SlapTool(BaseTool):
'slap_software_release_url': software_instance.getRootSoftwareReleaseUrl(), 'slap_software_release_url': software_instance.getRootSoftwareReleaseUrl(),
'slave_instance_list': slave_instance_list, 'slave_instance_list': slave_instance_list,
'ip_list': ip_list, 'ip_list': ip_list,
'timestamp': "%s" % timestamp, 'timestamp': "%i" % timestamp,
} }
@UnrestrictedMethod @UnrestrictedMethod
......
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