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

BXC-4688 add processingJobs field to list projects cmd #113

Merged
merged 5 commits into from
Oct 24, 2024

Conversation

krwong
Copy link
Contributor

@krwong krwong commented Oct 23, 2024

https://unclibrary.atlassian.net/browse/BXC-4688

Add processingJobs field to list_projects command. Each job will have a pending or completed status. Currently, the only job is velocicropter.

ObjectNode velocicropterStatus = mapper.createObjectNode();
if (Files.exists(project.getProjectPath().resolve("processing/results/velocicroptor/job_completed"))) {
velocicropterStatus.put(STATUS, COMPLETED);
processingJobs.set("velocicropter", velocicropterStatus);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be velocicroptor rather than velocicropter. Maybe we need a constant for it somewhere since it's a mouthful, maybe a JOB_NAME constant in VelocicroptorRemoteJob that we should also use here https://github.com/UNC-Libraries/chompb/blob/main/src/main/java/edu/unc/lib/boxc/migration/cdm/ProcessSourceFilesCommand.java#L68


// velocicropter report status
ObjectNode velocicropterStatus = mapper.createObjectNode();
if (Files.exists(project.getProjectPath().resolve("processing/results/velocicroptor/job_completed"))) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should use this constant for where to find the velocicroptor results, to make it easier to keep things synced:
https://github.com/UNC-Libraries/chompb/blob/main/src/main/java/edu/unc/lib/boxc/migration/cdm/jobs/VelocicroptorRemoteJob.java#L28
you can change it to public

Comment on lines 92 to 93
objectNode.set("projectProperties", projectProperties);
objectNode.set("processingJobs", processingJobs);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might as well make constants for both of these, since all the other top level keys have them

@bbpennel bbpennel merged commit 47892c4 into main Oct 24, 2024
2 checks passed
@bbpennel bbpennel deleted the BXC-4688-list-report-status branch October 24, 2024 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants