mirror of https://github.com/Chocobozzz/PeerTube
parent
867ed6514d
commit
0223291c45
|
@ -1,24 +1,24 @@
|
|||
import { CronRepeatOptions, EveryRepeatOptions } from 'bull'
|
||||
import { randomBytes, randomInt } from 'crypto'
|
||||
import { invert } from 'lodash'
|
||||
import { join } from 'path'
|
||||
import { randomBytes } from 'crypto'
|
||||
import { ActivityPubActorType } from '../../shared/models/activitypub'
|
||||
import { FollowState } from '../../shared/models/actors'
|
||||
import {
|
||||
AbuseState,
|
||||
JobType,
|
||||
VideoImportState,
|
||||
VideoPrivacy,
|
||||
VideoTranscodingFPS,
|
||||
JobType,
|
||||
VideoRateType,
|
||||
VideoResolution,
|
||||
VideoState
|
||||
VideoState,
|
||||
VideoTranscodingFPS
|
||||
} from '../../shared/models'
|
||||
// Do not use barrels, remain constants as independent as possible
|
||||
import { isTestInstance, sanitizeHost, sanitizeUrl, root } from '../helpers/core-utils'
|
||||
import { ActivityPubActorType } from '../../shared/models/activitypub'
|
||||
import { FollowState } from '../../shared/models/actors'
|
||||
import { NSFWPolicyType } from '../../shared/models/videos/nsfw-policy.type'
|
||||
import { invert } from 'lodash'
|
||||
import { CronRepeatOptions, EveryRepeatOptions } from 'bull'
|
||||
import { VideoPlaylistPrivacy } from '../../shared/models/videos/playlist/video-playlist-privacy.model'
|
||||
import { VideoPlaylistType } from '../../shared/models/videos/playlist/video-playlist-type.model'
|
||||
// Do not use barrels, remain constants as independent as possible
|
||||
import { isTestInstance, root, sanitizeHost, sanitizeUrl } from '../helpers/core-utils'
|
||||
import { CONFIG, registerConfigChangedHandler } from './config'
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
@ -172,7 +172,7 @@ const JOB_TTL: { [id in JobType]: number } = {
|
|||
}
|
||||
const REPEAT_JOBS: { [ id: string ]: EveryRepeatOptions | CronRepeatOptions } = {
|
||||
'videos-views': {
|
||||
cron: '1 * * * *' // At 1 minute past the hour
|
||||
cron: randomInt(1, 20) + ' * * * *' // Between 1-20 minutes past the hour
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue