Browse Source

fix: trigger tele

pull/9323/head
DarkPhoenix2704 2 months ago
parent
commit
8c5df8393b
  1. 9
      packages/nocodb/src/services/utils.service.ts

9
packages/nocodb/src/services/utils.service.ts

@ -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 {

Loading…
Cancel
Save