Skip to content

Commit

Permalink
Montage date query temporary fix
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasyi17 committed Jan 11, 2024
1 parent f3770f7 commit e66a7a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package/diana/cli/commands/mfind.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ def do_query(q):

if _query:
query["q"] = _query
query["start_date"] = start_date
query["end_date"] = end_date
query["start_date"] = datetime.strptime(str(start_date), "%Y-%m-%d %H:%M:%S").strftime("%Y-%m-%d")
query["end_date"] = datetime.strptime(str(end_date), "%Y-%m-%d %H:%M:%S").strftime("%Y-%m-%d")
result = do_query(query)

elif accession_numbers:
Expand Down
4 changes: 2 additions & 2 deletions package/diana/utils/gateways/requesters/montage.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def __str__(self):
return str(self.value)

# Max results to review for a given query
MONTAGE_RESULT_LIMIT = 1000000
MONTAGE_RESULT_LIMIT = 600
# Max results to return _per page_ for a given query
MONTAGE_RESULT_INCR = 200

Expand All @@ -44,7 +44,7 @@ def find(self, query: Mapping, index: str=None) -> list:

offset = 0
incr = MONTAGE_RESULT_INCR

put
resource = "index/{}/search/".format(index)
r = self._get(resource, params={**query,
'offset': offset,
Expand Down

0 comments on commit e66a7a3

Please sign in to comment.