Fixing various problems with the syncing of endpoints, throttling sta… (#398)

* Fixing various problems with the syncing of endpoints, throttling stale endpoints etc.
This commit is contained in:
kevgliss
2016-07-12 08:40:49 -07:00
committed by GitHub
parent 4f3dc5422c
commit f38868a97f
11 changed files with 102 additions and 17 deletions

View File

@ -67,6 +67,16 @@ def get_all_certs():
return Certificate.query.all()
def get_by_source(source_label):
"""
Retrieves all certificates from a given source.
:param source_label:
:return:
"""
return Certificate.query.filter(Certificate.sources.any(label=source_label))
def find_duplicates(cert_body):
"""
Finds certificates that already exist within Lemur. We do this by looking for