Conversation
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.
Looks like there's some work ongoing with tests.
I did have one question RE: the implementation in the sendExports()
method.
34e5464
to
aa37317
Compare
for (const _export of _exports) { | ||
_export.state = "complete"; | ||
_export.completedAt = now; | ||
await Export.logExport(_export); |
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.
Is this doing the same thing twice? logExport
is part of an @AfterUpdate
on the Exports model.
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.
@AfterUpdate
only fires after a single-item update. There's @AfterBatchUpdate
which happens after these kind of bulk updates, but they don't actually include the rows modified (because they would often be too big to fit in RAM). So, this kind of hack is needed
This PR replaces the single
export.update
for a class methodExportOps.complete()
accepting an array of Exports. This will speed up writing updates to successful exports.Checklists
Development
Impact
Please explain any security, performance, migration, or other impacts if relevant:
Code review