Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase MAST query limit. #1427

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion jwql/utils/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@
LOOK_OPTIONS = ["New", "Viewed"]

# Maximum number of records returned by MAST for a single query
MAST_QUERY_LIMIT = 500000
MAST_QUERY_LIMIT = 550000

# Expected position sensor values for MIRI. Used by the EDB monitor
# to filter out bad values. Tuple values are the expected value and
Expand Down
3 changes: 3 additions & 0 deletions jwql/website/apps/jwql/data_containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1409,6 +1409,9 @@ def get_proposals_by_category(instrument):
response = Mast.service_request_async(service, params)
results = response[0].json()['data']

if len(results) == MAST_QUERY_LIMIT:
logging.error(f"MAST_QUERY_LIMIT of {MAST_QUERY_LIMIT} reached for {instrument} in get_proposals_by_category")

# Get all unique dictionaries
unique_results = list(map(dict, set(tuple(sorted(sub.items())) for sub in results)))

Expand Down