Browse Source

fix: add timeout before starting job to allow socket instance to receive all messages

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/4705/head
mertmit 2 years ago
parent
commit
bcfb68b6fb
  1. 3
      packages/nocodb/src/lib/meta/api/sync/importApis.ts

3
packages/nocodb/src/lib/meta/api/sync/importApis.ts

@ -107,6 +107,7 @@ export default (
baseURL = `http://localhost:${process.env.PORT || 8080}`;
}
setTimeout(() => {
NocoJobs.jobsMgr.add<AirtableSyncConfig>(AIRTABLE_IMPORT_JOB, {
id: req.params.syncId,
...(syncSource?.details || {}),
@ -115,6 +116,8 @@ export default (
authToken: token,
baseURL,
});
}, 1000);
jobs[req.params.syncId] = {
last_message: {
msg: 'Sync started',

Loading…
Cancel
Save