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

NXP-30369: Avoid transaction timeout when computing piture views #4862

Conversation

ataillefer
Copy link
Member

No description provided.

@nuxeojenkins
Copy link
Collaborator

View issue in JIRA: NXP-30369: Process the picture views outside the transaction

@ataillefer ataillefer force-pushed the improvement-NXP-30369-process-picture-views-outside-transaction branch from ef99c3b to 2382c68 Compare June 24, 2021 08:03
@@ -123,7 +124,12 @@ public void work() {
setStatus("Generating views");
try {
PictureResourceAdapter picture = workingDocument.getAdapter(PictureResourceAdapter.class);
picture.fillPictureViews(blob, blob.getFilename(), title, null);
TransactionHelper.commitOrRollbackTransaction();
Copy link
Member

Choose a reason for hiding this comment

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

You can directly use AbstractWork#commitOrRollbackTransaction.

try {
picture.fillPictureViews(blob, blob.getFilename(), title, null);
} finally {
TransactionHelper.startTransaction();
Copy link
Member

Choose a reason for hiding this comment

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

And AbstractWork#startTransaction(); here.

@ataillefer
Copy link
Member Author

Replaced by #4863.

@ataillefer ataillefer closed this Jun 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants