Skip to content

Commit

Permalink
commenting print statements out of handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
juliamullen committed Nov 11, 2022
1 parent a63ca03 commit 223e561
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion web/handlers/genomics/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def _get(self):
query_obj = create_nested_mutation_query(lineages = query_pangolin_lineage, mutations = query_mutations, location_id = query_location)
query["query"] = query_obj
resp = yield self.asynchronous_fetch(query)
print(resp)
#print(resp)
path_to_results = ["aggregations", "date_collected", "buckets"]
buckets = resp
for i in path_to_results:
Expand Down
2 changes: 1 addition & 1 deletion web/handlers/genomics/gisaid_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ async def wrapper(self: RequestHandler, *args, **kwargs) -> Optional[Awaitable[N
self.write({"message": "Invalid token. Please authenticate!"})
return self.finish()
token_diff_time = (dt.now(timezone.utc) - dt.utcfromtimestamp(decoded_token["last_checked"]).replace(tzinfo=timezone.utc)).seconds
print(token_diff_time)
#print(token_diff_time)
reset_last_checked = False # False only if cache expired and token is unauthenticated
if token_diff_time <= CACHE_TIME: # Cached token
if decoded_token["is_authenticated"]: # Authenticated
Expand Down
2 changes: 1 addition & 1 deletion web/handlers/genomics/lineage.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def _get(self):
if len(query_lineage_split) > 1:
query_mutations = query_lineage_split[1:] # First parameter is always lineage
query["query"] = create_nested_mutation_query(lineages = query_pangolin_lineage, mutations = query_mutations)
print(query)
#print(query)
resp = yield self.asynchronous_fetch(query)
path_to_results = ["aggregations", "mutations", "mutations", "buckets"]
buckets = resp
Expand Down
2 changes: 1 addition & 1 deletion web/handlers/genomics/prevalence.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def _get(self):
parse_location_id_to_query(query_location, query["aggs"]["prevalence"]["filter"])
lineages = i.split(" OR ") if i is not None else []
query_obj = create_nested_mutation_query(lineages = lineages, mutations = j, location_id = query_location)
print(query_obj)
#print(query_obj)
query["aggs"]["prevalence"]["aggs"]["count"]["aggs"]["lineage_count"]["filter"] = query_obj
resp = yield self.asynchronous_fetch(query)
path_to_results = ["aggregations", "prevalence", "count", "buckets"]
Expand Down

0 comments on commit 223e561

Please sign in to comment.