aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/constants.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/initializers/constants.ts')
-rw-r--r--server/initializers/constants.ts22
1 files changed, 11 insertions, 11 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index 97fd1bdc1..0bb251043 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -1,24 +1,24 @@
1import { CronRepeatOptions, EveryRepeatOptions } from 'bull'
2import { randomBytes, randomInt } from 'crypto'
3import { invert } from 'lodash'
1import { join } from 'path' 4import { join } from 'path'
2import { randomBytes } from 'crypto'
3import { ActivityPubActorType } from '../../shared/models/activitypub'
4import { FollowState } from '../../shared/models/actors'
5import { 5import {
6 AbuseState, 6 AbuseState,
7 JobType,
7 VideoImportState, 8 VideoImportState,
8 VideoPrivacy, 9 VideoPrivacy,
9 VideoTranscodingFPS,
10 JobType,
11 VideoRateType, 10 VideoRateType,
12 VideoResolution, 11 VideoResolution,
13 VideoState 12 VideoState,
13 VideoTranscodingFPS
14} from '../../shared/models' 14} from '../../shared/models'
15// Do not use barrels, remain constants as independent as possible 15import { ActivityPubActorType } from '../../shared/models/activitypub'
16import { isTestInstance, sanitizeHost, sanitizeUrl, root } from '../helpers/core-utils' 16import { FollowState } from '../../shared/models/actors'
17import { NSFWPolicyType } from '../../shared/models/videos/nsfw-policy.type' 17import { NSFWPolicyType } from '../../shared/models/videos/nsfw-policy.type'
18import { invert } from 'lodash'
19import { CronRepeatOptions, EveryRepeatOptions } from 'bull'
20import { VideoPlaylistPrivacy } from '../../shared/models/videos/playlist/video-playlist-privacy.model' 18import { VideoPlaylistPrivacy } from '../../shared/models/videos/playlist/video-playlist-privacy.model'
21import { VideoPlaylistType } from '../../shared/models/videos/playlist/video-playlist-type.model' 19import { VideoPlaylistType } from '../../shared/models/videos/playlist/video-playlist-type.model'
20// Do not use barrels, remain constants as independent as possible
21import { isTestInstance, root, sanitizeHost, sanitizeUrl } from '../helpers/core-utils'
22import { CONFIG, registerConfigChangedHandler } from './config' 22import { CONFIG, registerConfigChangedHandler } from './config'
23 23
24// --------------------------------------------------------------------------- 24// ---------------------------------------------------------------------------
@@ -172,7 +172,7 @@ const JOB_TTL: { [id in JobType]: number } = {
172} 172}
173const REPEAT_JOBS: { [ id: string ]: EveryRepeatOptions | CronRepeatOptions } = { 173const REPEAT_JOBS: { [ id: string ]: EveryRepeatOptions | CronRepeatOptions } = {
174 'videos-views': { 174 'videos-views': {
175 cron: '1 * * * *' // At 1 minute past the hour 175 cron: randomInt(1, 20) + ' * * * *' // Between 1-20 minutes past the hour
176 } 176 }
177} 177}
178 178