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

Remove duplicate "Setting status of job to COMPLETE" Workflow Manager log line and other improvements #1336

Closed
jrobble opened this issue May 24, 2021 · 0 comments

Comments

@jrobble
Copy link
Member

jrobble commented May 24, 2021

Duplicate "Setting status of job to COMPLETE" log line:

From @jrobble :

Our Camel route invokes JobStatusCalculator.calculateStatus() (which in turn invokes inProgressJobs.setJobStatus()) before the job is sent to the JobCompleteProcessorImpl. Once it's there, we invoke createOutputObject() followed by inProgressJobs.setJobStatus().

createOutputObject() invokes storageService.store() which can change the job status if there is an issue writing out the JSON output object (possibly to the object store). For that reason we have to set the job status again afterward.

An end user is trying to create Kibana visualizations and was trying to get some job counts with associated status. Using the "Setting status of job to COMPLETE" log line would result in duplicate counts.

From @brosenberg42 :

I think the problem is actually that JobStatusCalculator.nextStatus() should actually be using BUILDING_OUTPUT_OBJECT instead of COMPLETE*.

JobCompleteProcessor would have to change the state from BUILDING_OUTPUT_OBJECT to COMPLETE*. This is so that the first log line shows BUILDING_OUTPUT_OBJECT but COMPLETE is used before generating the JSON output object.

Also, the job status REST endpoint should show BUILDING_OUTPUT_OBJECT while the JSON output object is being written.


Other improvements:

  • Have the media inspection work queue log the job id, media url, data type, and mime type for each media
@jrobble jrobble added this to the Milestone 2 milestone May 24, 2021
@jrobble jrobble self-assigned this May 24, 2021
@jrobble jrobble added this to To do in OpenMPF: Development via automation May 24, 2021
@jrobble jrobble moved this from To do to Planned in OpenMPF: Development May 24, 2021
@jrobble jrobble changed the title Duplicate "Setting status of job <id> to COMPLETE" log line Improve Workflow Manager log messages May 25, 2021
@jrobble jrobble changed the title Improve Workflow Manager log messages Remove duplicate "Setting status of job to COMPLETE" log line and other improvements May 28, 2021
@jrobble jrobble changed the title Remove duplicate "Setting status of job to COMPLETE" log line and other improvements Remove duplicate "Setting status of job to COMPLETE" Workflow Manager log line and other improvements May 28, 2021
@jrobble jrobble moved this from Planned to In Progress in OpenMPF: Development Jun 2, 2021
@jrobble jrobble moved this from In Progress to Testing in OpenMPF: Development Jun 11, 2021
@jrobble jrobble closed this as completed Feb 15, 2022
OpenMPF: Development automation moved this from Testing to Closed Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants