Skip to content

Commit dd92860

Browse files
committed
Run in transaction for retries on lock errors
1 parent 631ddba commit dd92860

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/progress-report/migrations/reextract-all-progress-reports.migration.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export class ReextractPnpProgressReportsMigration extends BaseMigration {
2626
try {
2727
const pnp = this.files.asDownloadable(fv);
2828
const event = new PeriodicReportUploadedEvent(report, pnp, session);
29-
await this.eventBus.publish(event);
29+
await this.db.conn.runInTransaction(() => this.eventBus.publish(event));
3030
} catch (e) {
3131
this.logger.error('Failed to re-extract PnP', {
3232
report: report.id,

0 commit comments

Comments
 (0)