Browse Source

fix: interval error handling

nc-feat/attachment-clean-up
mertmit 4 months ago
parent
commit
6d02962315
  1. 10
      packages/nocodb/src/helpers/migrationJobs.ts

10
packages/nocodb/src/helpers/migrationJobs.ts

@ -116,11 +116,15 @@ export const updateMigrationJobsState = async (
export const setMigrationJobsStallInterval = () => {
// update stall check every 5 mins
const interval = setInterval(async () => {
const migrationJobsState = await getMigrationJobsState();
try {
const migrationJobsState = await getMigrationJobsState();
migrationJobsState.stall_check = Date.now();
migrationJobsState.stall_check = Date.now();
await updateMigrationJobsState(migrationJobsState);
await updateMigrationJobsState(migrationJobsState);
} catch (e) {
console.error('Error updating stall check for migration job', e);
}
}, 5 * 60 * 1000);
return interval;

Loading…
Cancel
Save