diff options
author | Chocobozzz <me@florianbigard.com> | 2019-07-16 15:03:00 +0200 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2019-07-24 10:58:16 +0200 |
commit | d133f3858288b20d790e9bb57664fc6e22d9aeaf (patch) | |
tree | 5ff8d553337bd97d92b0d5004e23239e4668721a /server/initializers/constants.ts | |
parent | e0ce715a1ded6e84c877004dae3e354c8716fb06 (diff) | |
download | PeerTube-d133f3858288b20d790e9bb57664fc6e22d9aeaf.tar.gz PeerTube-d133f3858288b20d790e9bb57664fc6e22d9aeaf.tar.zst PeerTube-d133f3858288b20d790e9bb57664fc6e22d9aeaf.zip |
Check latest plugins version with config interval
Diffstat (limited to 'server/initializers/constants.ts')
-rw-r--r-- | server/initializers/constants.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts index 367ae8d45..cd4d4e847 100644 --- a/server/initializers/constants.ts +++ b/server/initializers/constants.ts | |||
@@ -4,7 +4,7 @@ import { ActivityPubActorType } from '../../shared/models/activitypub' | |||
4 | import { FollowState } from '../../shared/models/actors' | 4 | import { FollowState } from '../../shared/models/actors' |
5 | import { VideoAbuseState, VideoImportState, VideoPrivacy, VideoTranscodingFPS } from '../../shared/models/videos' | 5 | import { VideoAbuseState, VideoImportState, VideoPrivacy, VideoTranscodingFPS } from '../../shared/models/videos' |
6 | // Do not use barrels, remain constants as independent as possible | 6 | // Do not use barrels, remain constants as independent as possible |
7 | import { isTestInstance, sanitizeHost, sanitizeUrl, root } from '../helpers/core-utils' | 7 | import { isTestInstance, sanitizeHost, sanitizeUrl, root, parseDurationToMs } from '../helpers/core-utils' |
8 | import { NSFWPolicyType } from '../../shared/models/videos/nsfw-policy.type' | 8 | import { NSFWPolicyType } from '../../shared/models/videos/nsfw-policy.type' |
9 | import { invert } from 'lodash' | 9 | import { invert } from 'lodash' |
10 | import { CronRepeatOptions, EveryRepeatOptions } from 'bull' | 10 | import { CronRepeatOptions, EveryRepeatOptions } from 'bull' |
@@ -167,7 +167,7 @@ const SCHEDULER_INTERVALS_MS = { | |||
167 | removeOldJobs: 60000 * 60, // 1 hour | 167 | removeOldJobs: 60000 * 60, // 1 hour |
168 | updateVideos: 60000, // 1 minute | 168 | updateVideos: 60000, // 1 minute |
169 | youtubeDLUpdate: 60000 * 60 * 24, // 1 day | 169 | youtubeDLUpdate: 60000 * 60 * 24, // 1 day |
170 | checkPlugins: 60000 * 60 * 24, // 1 day | 170 | checkPlugins: CONFIG.PLUGINS.INDEX.CHECK_LATEST_VERSIONS_INTERVAL, |
171 | removeOldViews: 60000 * 60 * 24, // 1 day | 171 | removeOldViews: 60000 * 60 * 24, // 1 day |
172 | removeOldHistory: 60000 * 60 * 24 // 1 day | 172 | removeOldHistory: 60000 * 60 * 24 // 1 day |
173 | } | 173 | } |
@@ -618,7 +618,6 @@ if (isTestInstance() === true) { | |||
618 | SCHEDULER_INTERVALS_MS.removeOldHistory = 5000 | 618 | SCHEDULER_INTERVALS_MS.removeOldHistory = 5000 |
619 | SCHEDULER_INTERVALS_MS.removeOldViews = 5000 | 619 | SCHEDULER_INTERVALS_MS.removeOldViews = 5000 |
620 | SCHEDULER_INTERVALS_MS.updateVideos = 5000 | 620 | SCHEDULER_INTERVALS_MS.updateVideos = 5000 |
621 | SCHEDULER_INTERVALS_MS.checkPlugins = 10000 | ||
622 | REPEAT_JOBS[ 'videos-views' ] = { every: 5000 } | 621 | REPEAT_JOBS[ 'videos-views' ] = { every: 5000 } |
623 | 622 | ||
624 | REDUNDANCY.VIDEOS.RANDOMIZED_FACTOR = 1 | 623 | REDUNDANCY.VIDEOS.RANDOMIZED_FACTOR = 1 |