Ensure one export per file for constants of trash-cleanup. (#15110)
Had three constant exports in one file, thus breaking the codebase pattern. Moved them to their separate files and fixed imports.
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ import { Command, CommandRunner } from 'nest-commander';
|
||||
import { InjectMessageQueue } from 'src/engine/core-modules/message-queue/decorators/message-queue.decorator';
|
||||
import { MessageQueue } from 'src/engine/core-modules/message-queue/message-queue.constants';
|
||||
import { MessageQueueService } from 'src/engine/core-modules/message-queue/services/message-queue.service';
|
||||
import { TRASH_CLEANUP_CRON_PATTERN } from 'src/engine/trash-cleanup/constants/trash-cleanup.constants';
|
||||
import { TRASH_CLEANUP_CRON_PATTERN } from 'src/engine/trash-cleanup/constants/trash-cleanup-cron-pattern.constant';
|
||||
import { TrashCleanupCronJob } from 'src/engine/trash-cleanup/crons/trash-cleanup.cron.job';
|
||||
|
||||
@Command({
|
||||
|
||||
+1
@@ -0,0 +1 @@
|
||||
export const TRASH_CLEANUP_BATCH_SIZE = 1_000;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export const TRASH_CLEANUP_CRON_PATTERN = '10 0 * * *';
|
||||
+1
@@ -0,0 +1 @@
|
||||
export const TRASH_CLEANUP_MAX_RECORDS_PER_WORKSPACE = 1_000_000;
|
||||
@@ -1,5 +0,0 @@
|
||||
// Daily at 00:10 UTC
|
||||
export const TRASH_CLEANUP_CRON_PATTERN = '10 0 * * *';
|
||||
|
||||
export const TRASH_CLEANUP_MAX_RECORDS_PER_WORKSPACE = 1_000_000;
|
||||
export const TRASH_CLEANUP_BATCH_SIZE = 1_000;
|
||||
@@ -12,7 +12,7 @@ import { Processor } from 'src/engine/core-modules/message-queue/decorators/proc
|
||||
import { MessageQueue } from 'src/engine/core-modules/message-queue/message-queue.constants';
|
||||
import { MessageQueueService } from 'src/engine/core-modules/message-queue/services/message-queue.service';
|
||||
import { Workspace } from 'src/engine/core-modules/workspace/workspace.entity';
|
||||
import { TRASH_CLEANUP_CRON_PATTERN } from 'src/engine/trash-cleanup/constants/trash-cleanup.constants';
|
||||
import { TRASH_CLEANUP_CRON_PATTERN } from 'src/engine/trash-cleanup/constants/trash-cleanup-cron-pattern.constant';
|
||||
import {
|
||||
TrashCleanupJob,
|
||||
type TrashCleanupJobData,
|
||||
|
||||
@@ -4,10 +4,8 @@ import { isDefined } from 'twenty-shared/utils';
|
||||
import { In, LessThan } from 'typeorm';
|
||||
|
||||
import { WorkspaceManyOrAllFlatEntityMapsCacheService } from 'src/engine/metadata-modules/flat-entity/services/workspace-many-or-all-flat-entity-maps-cache.service';
|
||||
import {
|
||||
TRASH_CLEANUP_BATCH_SIZE,
|
||||
TRASH_CLEANUP_MAX_RECORDS_PER_WORKSPACE,
|
||||
} from 'src/engine/trash-cleanup/constants/trash-cleanup.constants';
|
||||
import { TRASH_CLEANUP_BATCH_SIZE } from 'src/engine/trash-cleanup/constants/trash-cleanup-batch-size.constant';
|
||||
import { TRASH_CLEANUP_MAX_RECORDS_PER_WORKSPACE } from 'src/engine/trash-cleanup/constants/trash-cleanup-max-records-per-workspace.constant';
|
||||
import { TwentyORMGlobalManager } from 'src/engine/twenty-orm/twenty-orm-global.manager';
|
||||
|
||||
export type TrashCleanupInput = {
|
||||
|
||||
Reference in New Issue
Block a user