Round timestamp

This commit is contained in:
Antonio J. Delgado 2022-12-26 19:24:17 +02:00
parent 6d19d80d14
commit 5e1c1c7fd9
3 changed files with 3 additions and 3 deletions

View file

@ -7,7 +7,7 @@ Homepage = "https://susurrando.com"
[project]
name = "restic_exporter"
version = "0.0.4"
version = "0.0.5"
description = "Export to node exporter the summary of a restic backup"
readme = "README.md"
authors = [{ name = "Antonio J. Delgado", email = "ad@susurrando.com" }]

View file

@ -77,7 +77,7 @@ class restic_exporter:
if 'snapshot_id' in line_data:
self.labels["snapshot_id"] = line_data['snapshot_id']
file_stats = os.stat(json_file)
self.summary['timestamp'] = file_stats.st_mtime * 1000
self.summary['timestamp'] = round(file_stats.st_mtime * 1000)
self._log.debug(f"Summary: {json.dumps(self.summary, indent=2)}")
self._log.debug(f"Labels: {self.labels}")

View file

@ -2,7 +2,7 @@ import setuptools
setuptools.setup(
scripts=['restic_exporter/restic_exporter.py'],
author="Antonio J. Delgado",
version='0.0.4',
version='0.0.5',
name='restic_exporter',
author_email="",
url="",