Merge "Track status report timestamp"

This commit is contained in:
Jenkins
2016-04-03 05:53:10 +00:00
committed by Gerrit Code Review
2 changed files with 5 additions and 1 deletions

View File

@@ -178,6 +178,8 @@ def report_notification(report):
del report['id']
status = models.Status()
if 'timestamp' in report:
report['created'] = timeutils.parse_isotime(report.pop('timestamp'))
status.update(report)
unit = session.get_session()

View File

@@ -16,6 +16,7 @@
from oslo_config import cfg
import oslo_messaging as messaging
from oslo_utils import timeutils
import six
from murano.common import uuidutils
@@ -47,7 +48,8 @@ class StatusReporter(object):
'text': msg,
'details': details,
'level': level,
'environment_id': self._environment_id
'environment_id': self._environment_id,
'timestamp': timeutils.isotime()
}
self._notifier.info({}, 'murano.report_notification', body)