From 5f3bc93ed38b1a42d2e8cee5992a3e6303bf4a69 Mon Sep 17 00:00:00 2001 From: mertmit Date: Sat, 10 Aug 2024 07:32:01 +0000 Subject: [PATCH] temp: disable external source updates for replica --- .../modules/jobs/migration-jobs/nc_job_001_attachment.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/nocodb/src/modules/jobs/migration-jobs/nc_job_001_attachment.ts b/packages/nocodb/src/modules/jobs/migration-jobs/nc_job_001_attachment.ts index 03a20353e1..d438c013e3 100644 --- a/packages/nocodb/src/modules/jobs/migration-jobs/nc_job_001_attachment.ts +++ b/packages/nocodb/src/modules/jobs/migration-jobs/nc_job_001_attachment.ts @@ -207,6 +207,7 @@ export class AttachmentMigration { if (isExternal) { try { + this.log(`Checking connection for ${source_id} (${source.alias})`); // run SELECT 1 to check if connection is working // return if no response in 10 seconds await Promise.race([ @@ -215,6 +216,10 @@ export class AttachmentMigration { setTimeout(() => reject(new Error('timeout')), 10000), ), ]); + + this.log( + `External source ${source_id} (${source.alias}) is accessible`, + ); } catch (e) { this.log( `External source ${source_id} (${source.alias}) is not accessible`, @@ -425,7 +430,8 @@ export class AttachmentMigration { updatePayload.push(updateData); } - if (updatePayload.length > 0) { + // TODO: enable external updates for production + if (updatePayload.length > 0 && !isExternal) { for (const updateData of updatePayload) { const wherePk = await baseModel._wherePk( baseModel._extractPksValues(updateData),