Skip to content

Commit

Permalink
turn caching on by default
Browse files Browse the repository at this point in the history
  • Loading branch information
mwang87 committed Mar 23, 2021
1 parent 077a02b commit 3f68db6
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,11 @@ def classify_structure(smiles):
def classify():
smiles_string = request.values.get("smiles")

if "cached" in request.values:
try:
db_record = ClassifyEntity.get(ClassifyEntity.smiles == smiles_string)
return db_record.classification_json
except:
pass
try:
db_record = ClassifyEntity.get(ClassifyEntity.smiles == smiles_string)
return db_record.classification_json
except:
pass

isglycoside, class_results, superclass_results, pathway_results, path_from_class, path_from_superclass, n_path, fp1, fp2 = classify_structure(smiles_string)

Expand Down

0 comments on commit 3f68db6

Please sign in to comment.