-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add support for DPS sandbox queue #136
Conversation
sujen1412
commented
Aug 27, 2024
- This PR validates the job queue on submissions against a list of valid queues.
- Also validates queue at algorithm registration
- On job submission when the queue specified is DPS sandbox, it sets the timeout by default.
api/endpoints/algorithm.py
Outdated
response_body["error"] = "Invalid queue in request: {}".format(req_data) | ||
return response_body, 500 | ||
return response_body, status.HTTP_400_BAD_REQUEST |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI I added a helper function for condensing error responses: https://github.com/MAAP-Project/maap-api-nasa/blob/develop/api/utils/http_util.py
@bsatoriu - one thing I can think of changing once your feature is complete is to replace the hysds.get_queues function with a maap.get_queues function as we want to have our own list of queues available for a user. Something to keep in mind once this is merged. |
api/utils/hysds_util.py
Outdated
:param params: | ||
:return: params | ||
""" | ||
params.update({"soft_time_limit": settings.DPS_SANDBOX_TIMELIMIT, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sujen1412 soft_time_limit
and time_limit
seem well suited as properties in the job_queue class. That would allow us to configure these settings at the queue level via the admin rather than programmatically.
Quality Gate passedIssues Measures |
* Respond with HTTP 400 if invalid queue provided during registration * Update dos job time limits if using dps sand box queue * Ensure that message is of type string * update code to use new job_queue.get_user_queues() function * Move queue settings to db * add is_default and time_limit_minutes to job_queue endpoints * Job submission bug fix --------- Co-authored-by: bsatoriu <[email protected]>