diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/initializers/config.ts | 3 | ||||
-rw-r--r-- | server/initializers/constants.ts | 5 | ||||
-rw-r--r-- | server/lib/schedulers/plugins-check-scheduler.ts | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/server/initializers/config.ts b/server/initializers/config.ts index 2c1b30021..58241e4ea 100644 --- a/server/initializers/config.ts +++ b/server/initializers/config.ts | |||
@@ -137,7 +137,8 @@ const CONFIG = { | |||
137 | PLUGINS: { | 137 | PLUGINS: { |
138 | INDEX: { | 138 | INDEX: { |
139 | ENABLED: config.get<boolean>('plugins.index.enabled'), | 139 | ENABLED: config.get<boolean>('plugins.index.enabled'), |
140 | URL: config.get<boolean>('plugins.index.url') | 140 | CHECK_LATEST_VERSIONS_INTERVAL: parseDurationToMs(config.get<string>('plugins.index.check_latest_versions_interval')), |
141 | URL: config.get<string>('plugins.index.url') | ||
141 | } | 142 | } |
142 | }, | 143 | }, |
143 | ADMIN: { | 144 | ADMIN: { |
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 |
diff --git a/server/lib/schedulers/plugins-check-scheduler.ts b/server/lib/schedulers/plugins-check-scheduler.ts index 8dfdd5177..7ff41e639 100644 --- a/server/lib/schedulers/plugins-check-scheduler.ts +++ b/server/lib/schedulers/plugins-check-scheduler.ts | |||
@@ -53,7 +53,7 @@ export class PluginsCheckScheduler extends AbstractScheduler { | |||
53 | plugin.latestVersion = result.latestVersion | 53 | plugin.latestVersion = result.latestVersion |
54 | await plugin.save() | 54 | await plugin.save() |
55 | 55 | ||
56 | logger.info('Plugin %s has a new latest version %s.', PluginModel.buildNpmName(plugin.name, plugin.type), plugin.latestVersion) | 56 | logger.info('Plugin %s has a new latest version %s.', result.npmName, plugin.latestVersion) |
57 | } | 57 | } |
58 | } | 58 | } |
59 | } catch (err) { | 59 | } catch (err) { |