Browse Source

fix: avoid rerun if failed

nc-feat/attachment-clean-up
mertmit 4 months ago
parent
commit
e92c914473
  1. 8
      packages/nocodb/src/modules/jobs/migration-jobs/init-migration-jobs.ts

8
packages/nocodb/src/modules/jobs/migration-jobs/init-migration-jobs.ts

@ -120,8 +120,12 @@ export class InitMigrationJobs {
// clear stall interval
clearInterval(stallInterval);
// run the job again
await this.jobsService.add(MigrationJobTypes.InitMigrationJobs, {});
// run the job again if successful
if (migrated) {
await this.jobsService.add(MigrationJobTypes.InitMigrationJobs, {});
} else {
this.log('A migration job failed!');
}
} catch (e) {
this.log('Error running migration: ', e);
}

Loading…
Cancel
Save