Add endpoint to retrieve total count of DockerJob records#120
Merged
peppermint-juli merged 8 commits intoJul 8, 2026
Merged
Conversation
peppermint-juli
marked this pull request as ready for review
July 1, 2026 21:01
amitschang
reviewed
Jul 2, 2026
amitschang
left a comment
Contributor
There was a problem hiding this comment.
Minor inline comment. And I guess there are some checkstyle violations introduced (causing the build fail). Even though there are a gazillion existing warnings, our approach so far has been to not increase when feasible.
…oints - Consolidated job querying methods for better readability and maintainability. - Enhanced error handling for job submission and querying. - Improved logging for job actions to provide clearer insights. - Added new endpoint for querying jobs queues. - Updated method signatures and comments for clarity.
Contributor
Author
I fixed all the warnings in the two files I modified. |
…f createNativeQuery
… counting DockerJobs
amitschang
approved these changes
Jul 8, 2026
amitschang
left a comment
Contributor
There was a problem hiding this comment.
Looks good to me. Confirmed on dev deployment hitting:
curl https://dev.sites.idies.jhu.edu/arik/racm/jobm/rest/jobs/count -Hx-auth-token:...
returns
{"count":0}
peppermint-juli
deleted the
81-add-job-count-to-getjobs-api-endpoint-response
branch
July 8, 2026 19:34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #81
This pull request adds a new API endpoint to retrieve the total count of Docker jobs for a user. It introduces a backend method to efficiently query the count and exposes it through a REST API in the controller. The main changes are grouped below:
Backend functionality:
queryUserDockerJobsCountinJOBM.javato query the total number of DockerJob records for a given user using a native SQL count query.API/Controller updates:
/jobs/countinJOBMRESTController.javathat returns the total number of DockerJob records for the authenticated user, handling exceptions and returning a JSON response.Other:
JOBM.java.