|
|
|
@ -5,6 +5,8 @@ import { compareVersions, validate } from 'compare-versions';
|
|
|
|
|
import { ViewTypes } from 'nocodb-sdk'; |
|
|
|
|
import { ConfigService } from '@nestjs/config'; |
|
|
|
|
import { useAgent } from 'request-filtering-agent'; |
|
|
|
|
import dayjs from 'dayjs'; |
|
|
|
|
import { T } from 'nc-help'; |
|
|
|
|
import type { AppConfig, NcRequest } from '~/interface/config'; |
|
|
|
|
import { NC_APP_SETTINGS, NC_ATTACHMENT_FIELD_SIZE } from '~/constants'; |
|
|
|
|
import SqlMgrv2 from '~/db/sql-mgr/v2/SqlMgrv2'; |
|
|
|
@ -75,6 +77,8 @@ interface AllMeta {
|
|
|
|
|
export class UtilsService { |
|
|
|
|
constructor(protected readonly configService: ConfigService<AppConfig>) {} |
|
|
|
|
|
|
|
|
|
lastSyncTime = dayjs(); |
|
|
|
|
|
|
|
|
|
async versionInfo() { |
|
|
|
|
if ( |
|
|
|
|
!versionCache.lastFetched || |
|
|
|
@ -497,6 +501,11 @@ export class UtilsService {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (dayjs().isAfter(this.lastSyncTime.add(3, 'hours'))) { |
|
|
|
|
T.emit('ph_event', {}); |
|
|
|
|
this.lastSyncTime = dayjs(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
let response; |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|