Skip to content

Commit

Permalink
fix: Fix batch operation rollback issue
Browse files Browse the repository at this point in the history
  • Loading branch information
JanCizmar committed Oct 23, 2023
1 parent 1444d85 commit 2257042
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,17 @@ class BatchJobActionService(
savePointManager.rollbackSavepoint(savepoint)
// we have rolled back the transaction, so no targets were actually successfull
lockedExecution.successTargets = listOf()
entityManager.clear()
rollbackActivity()
}

progressManager.handleProgress(lockedExecution)
entityManager.persist(lockedExecution)
entityManager.persist(entityManager.merge(lockedExecution))

if (lockedExecution.retry) {
retryExecution = util.retryExecution
entityManager.persist(util.retryExecution)
entityManager.flush()
}

logger.debug("Job ${batchJobDto.id}: ✅ Processed chunk ${lockedExecution.id}")
Expand Down
2 changes: 1 addition & 1 deletion e2e/cypress/e2e/projects/projectMembers.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ describe('Project members', () => {
);
});

it.only('selects Translate role for the user', () => {
it('selects Translate role for the user', () => {
visitProjectMembers(info.project.id);
openMemberSettings('me@me.me');
permissionsMenuSelectRole('Translate', { languages: ['Czech'] });
Expand Down

0 comments on commit 2257042

Please sign in to comment.