Clean refactor (#635)

* Adding rotation to the UI.

* Removing spinkit dependency.

* refactoring source cleaning
This commit is contained in:
kevgliss
2016-12-27 10:31:33 -08:00
committed by GitHub
parent 700c57b807
commit de7cec35c6
8 changed files with 86 additions and 87 deletions

View File

@ -68,14 +68,15 @@ def get_all_certs():
return Certificate.query.all()
def get_by_source(source_label):
def get_all_pending_cleaning(source):
"""
Retrieves all certificates from a given source.
Retrieves all certificates that are available for cleaning.
:param source_label:
:param source:
:return:
"""
return Certificate.query.filter(Certificate.sources.any(label=source_label))
return Certificate.query.filter(Certificate.sources.any(id=source.id))\
.filter(not_(Certificate.endpoints.any())).all()
def get_all_pending_reissue():