-
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 timestamps to Preservation tasks #842
Conversation
09a3067
to
533b581
Compare
533b581
to
546b788
Compare
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.
I've added a few comments. Have you confirmed that the timestamps are being properly recorded? In the savePreservationTasks
method, I see the following:
pt := ConvertJobToPreservationTask(job)
pt.PreservationActionID = jt.presActionID
now := sql.NullTime{Time: jt.clock.Now(), Valid: true}
pt.StartedAt = now
pt.CompletedAt = now
With your changes, ConvertJobToPreservationTask is populating the timestamps but they're set to now
right after. If you tested this PR and observed the timestamps recorded I suppose that'd become apparent.
Only thing I am worried about for this is that the tasks could very well be completed before this current time such that if any task that would have had a different completedAt time would have |
I fixed this concern. I also added some of the tests. There is better test coverage and I individually tested both of the functions to make sure they return the correct times. |
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.
I think this is almost complete but I've included additional comments. I also submitted 9a77eff myself to save you the extra work. Please let me know your thoughts.
Adds timestamps to Preservations Tasks and gives additional details to the user in the enduro dashboard about when archivematica jobs started and finished. Closes #832
It looks great @sevein, I didn't realize you were suggesting removing the null check here, but I suppose that makes sense. Thanks for implementing the solutions to the tests as well. They look great. I have rebased and formatted the commit. It is ready to merge. |
9a77eff
to
c9dd3a7
Compare
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.
👍
This PR aims to add timestamps to Preservations Tasks and give additional detail to the user in the enduro dashboard about when archivematica jobs started and finished.
Closes #832