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 { join } from 'path'
|
||||||
import { randomBytes } from 'crypto'
|
|
||||||
import { ActivityPubActorType } from '../../shared/models/activitypub'
|
|
||||||
import { FollowState } from '../../shared/models/actors'
|
|
||||||
import {
|
import {
|
||||||
AbuseState,
|
AbuseState,
|
||||||
|
JobType,
|
||||||
VideoImportState,
|
VideoImportState,
|
||||||
VideoPrivacy,
|
VideoPrivacy,
|
||||||
VideoTranscodingFPS,
|
|
||||||
JobType,
|
|
||||||
VideoRateType,
|
VideoRateType,
|
||||||
VideoResolution,
|
VideoResolution,
|
||||||
VideoState
|
VideoState,
|
||||||
|
VideoTranscodingFPS
|
||||||
} from '../../shared/models'
|
} from '../../shared/models'
|
||||||
// Do not use barrels, remain constants as independent as possible
|
import { ActivityPubActorType } from '../../shared/models/activitypub'
|
||||||
import { isTestInstance, sanitizeHost, sanitizeUrl, root } from '../helpers/core-utils'
|
import { FollowState } from '../../shared/models/actors'
|
||||||
import { NSFWPolicyType } from '../../shared/models/videos/nsfw-policy.type'
|
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 { VideoPlaylistPrivacy } from '../../shared/models/videos/playlist/video-playlist-privacy.model'
|
||||||
import { VideoPlaylistType } from '../../shared/models/videos/playlist/video-playlist-type.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'
|
import { CONFIG, registerConfigChangedHandler } from './config'
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
@ -172,7 +172,7 @@ const JOB_TTL: { [id in JobType]: number } = {
|
||||||
}
|
}
|
||||||
const REPEAT_JOBS: { [ id: string ]: EveryRepeatOptions | CronRepeatOptions } = {
|
const REPEAT_JOBS: { [ id: string ]: EveryRepeatOptions | CronRepeatOptions } = {
|
||||||
'videos-views': {
|
'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