keeping track of certs found by hash

This commit is contained in:
Hossein Shafagh 2019-10-18 11:20:52 -07:00
parent 11f9920ff9
commit 06f4aed693
1 changed files with 8 additions and 0 deletions

View File

@ -221,6 +221,14 @@ def sync(source, user):
new_certs, updated_certs, updated_certs_by_hash = sync_certificates(source, user)
new_endpoints, updated_endpoints, updated_endpoints_by_hash = sync_endpoints(source)
metrics.send("sync.updated_certs_by_hash",
"gauge", updated_certs_by_hash,
metric_tags={"source": source.label})
metrics.send("sync.updated_endpoints_by_hash",
"gauge", updated_endpoints_by_hash,
metric_tags={"source": source.label})
source.last_run = arrow.utcnow()
database.update(source)