|
|
@ -2,7 +2,6 @@ import moment from 'moment'; |
|
|
|
import { UITypes } from 'nocodb-sdk'; |
|
|
|
import { UITypes } from 'nocodb-sdk'; |
|
|
|
import Airtable from 'airtable'; |
|
|
|
import Airtable from 'airtable'; |
|
|
|
import hash from 'object-hash'; |
|
|
|
import hash from 'object-hash'; |
|
|
|
import { T } from 'nc-help'; |
|
|
|
|
|
|
|
import dayjs from 'dayjs'; |
|
|
|
import dayjs from 'dayjs'; |
|
|
|
import utc from 'dayjs/plugin/utc'; |
|
|
|
import utc from 'dayjs/plugin/utc'; |
|
|
|
import tinycolor from 'tinycolor2'; |
|
|
|
import tinycolor from 'tinycolor2'; |
|
|
@ -33,6 +32,7 @@ import { ViewsService } from '~/services/views.service'; |
|
|
|
import { FormsService } from '~/services/forms.service'; |
|
|
|
import { FormsService } from '~/services/forms.service'; |
|
|
|
import { JOBS_QUEUE, JobTypes } from '~/interface/Jobs'; |
|
|
|
import { JOBS_QUEUE, JobTypes } from '~/interface/Jobs'; |
|
|
|
import { GridColumnsService } from '~/services/grid-columns.service'; |
|
|
|
import { GridColumnsService } from '~/services/grid-columns.service'; |
|
|
|
|
|
|
|
import { TelemetryService } from '~/services/telemetry.service'; |
|
|
|
|
|
|
|
|
|
|
|
dayjs.extend(utc); |
|
|
|
dayjs.extend(utc); |
|
|
|
|
|
|
|
|
|
|
@ -104,6 +104,7 @@ export class AtImportProcessor { |
|
|
|
private readonly bulkDataAliasService: BulkDataAliasService, |
|
|
|
private readonly bulkDataAliasService: BulkDataAliasService, |
|
|
|
private readonly jobsLogService: JobsLogService, |
|
|
|
private readonly jobsLogService: JobsLogService, |
|
|
|
private readonly gridColumnService: GridColumnsService, |
|
|
|
private readonly gridColumnService: GridColumnsService, |
|
|
|
|
|
|
|
private readonly telemetryService: TelemetryService, |
|
|
|
) {} |
|
|
|
) {} |
|
|
|
|
|
|
|
|
|
|
|
@Process(JobTypes.AtImport) |
|
|
|
@Process(JobTypes.AtImport) |
|
|
@ -1981,8 +1982,10 @@ export class AtImportProcessor { |
|
|
|
logBasic(`:: Axios fetch count: ${rtc.fetchAt.count}`); |
|
|
|
logBasic(`:: Axios fetch count: ${rtc.fetchAt.count}`); |
|
|
|
logBasic(`:: Axios fetch time: ${rtc.fetchAt.time}`); |
|
|
|
logBasic(`:: Axios fetch time: ${rtc.fetchAt.time}`); |
|
|
|
|
|
|
|
|
|
|
|
T.event({ |
|
|
|
this.telemetryService.sendEvent({ |
|
|
|
event: 'a:airtable-import:success', |
|
|
|
evt_type: 'a:airtable-import:success', |
|
|
|
|
|
|
|
user_id: syncDB.user.id, |
|
|
|
|
|
|
|
email: syncDB.user.email, |
|
|
|
data: { |
|
|
|
data: { |
|
|
|
stats: { |
|
|
|
stats: { |
|
|
|
migrationTime: duration, |
|
|
|
migrationTime: duration, |
|
|
@ -2515,8 +2518,9 @@ export class AtImportProcessor { |
|
|
|
} |
|
|
|
} |
|
|
|
} catch (e) { |
|
|
|
} catch (e) { |
|
|
|
if (e.message) { |
|
|
|
if (e.message) { |
|
|
|
T.event({ |
|
|
|
this.telemetryService.sendEvent({ |
|
|
|
event: 'a:airtable-import:error', |
|
|
|
evt_type: 'a:airtable-import:error', |
|
|
|
|
|
|
|
user_id: syncDB.user.id, |
|
|
|
data: { error: e.message }, |
|
|
|
data: { error: e.message }, |
|
|
|
}); |
|
|
|
}); |
|
|
|
console.log(e); |
|
|
|
console.log(e); |
|
|
|