aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-05-24 14:55:07 +0200
committerChocobozzz <me@florianbigard.com>2022-05-24 14:55:07 +0200
commit3eba7ab8154027621989cdd4814bc749d79bf0c9 (patch)
treef3f0b6887c00660dc3f7da79ff2fe2379d170aaf /server
parent3cb60ca19eba97738342a10e15d5e5a916e2e690 (diff)
downloadPeerTube-3eba7ab8154027621989cdd4814bc749d79bf0c9.tar.gz
PeerTube-3eba7ab8154027621989cdd4814bc749d79bf0c9.tar.zst
PeerTube-3eba7ab8154027621989cdd4814bc749d79bf0c9.zip
Add ability to set a custom video import timeout
Diffstat (limited to 'server')
-rw-r--r--server/initializers/checker-before-init.ts4
-rw-r--r--server/initializers/config.ts1
-rw-r--r--server/initializers/constants.ts2
-rw-r--r--server/lib/schedulers/geo-ip-update-scheduler.ts2
4 files changed, 5 insertions, 4 deletions
diff --git a/server/initializers/checker-before-init.ts b/server/initializers/checker-before-init.ts
index 794303743..266579246 100644
--- a/server/initializers/checker-before-init.ts
+++ b/server/initializers/checker-before-init.ts
@@ -31,8 +31,8 @@ function checkMissedConfig () {
31 'transcoding.resolutions.0p', 'transcoding.resolutions.144p', 'transcoding.resolutions.240p', 'transcoding.resolutions.360p', 31 'transcoding.resolutions.0p', 'transcoding.resolutions.144p', 'transcoding.resolutions.240p', 'transcoding.resolutions.360p',
32 'transcoding.resolutions.480p', 'transcoding.resolutions.720p', 'transcoding.resolutions.1080p', 'transcoding.resolutions.1440p', 32 'transcoding.resolutions.480p', 'transcoding.resolutions.720p', 'transcoding.resolutions.1080p', 'transcoding.resolutions.1440p',
33 'transcoding.resolutions.2160p', 'video_studio.enabled', 33 'transcoding.resolutions.2160p', 'video_studio.enabled',
34 'import.videos.http.enabled', 'import.videos.torrent.enabled', 'import.videos.concurrency', 'auto_blacklist.videos.of_users.enabled', 34 'import.videos.http.enabled', 'import.videos.torrent.enabled', 'import.videos.concurrency', 'import.videos.timeout',
35 'trending.videos.interval_days', 35 'auto_blacklist.videos.of_users.enabled', 'trending.videos.interval_days',
36 'client.videos.miniature.display_author_avatar', 36 'client.videos.miniature.display_author_avatar',
37 'client.videos.miniature.prefer_author_display_name', 'client.menu.login.redirect_on_single_external_auth', 37 'client.videos.miniature.prefer_author_display_name', 'client.menu.login.redirect_on_single_external_auth',
38 'defaults.publish.download_enabled', 'defaults.publish.comments_enabled', 'defaults.publish.privacy', 'defaults.publish.licence', 38 'defaults.publish.download_enabled', 'defaults.publish.comments_enabled', 'defaults.publish.privacy', 'defaults.publish.licence',
diff --git a/server/initializers/config.ts b/server/initializers/config.ts
index 59a65d6a5..2f59e3e3e 100644
--- a/server/initializers/config.ts
+++ b/server/initializers/config.ts
@@ -349,6 +349,7 @@ const CONFIG = {
349 IMPORT: { 349 IMPORT: {
350 VIDEOS: { 350 VIDEOS: {
351 get CONCURRENCY () { return config.get<number>('import.videos.concurrency') }, 351 get CONCURRENCY () { return config.get<number>('import.videos.concurrency') },
352 get TIMEOUT () { return parseDurationToMs(config.get<string>('import.videos.timeout')) },
352 353
353 HTTP: { 354 HTTP: {
354 get ENABLED () { return config.get<boolean>('import.videos.http.enabled') }, 355 get ENABLED () { return config.get<boolean>('import.videos.http.enabled') },
diff --git a/server/initializers/constants.ts b/server/initializers/constants.ts
index 909fffdb6..02c1ef251 100644
--- a/server/initializers/constants.ts
+++ b/server/initializers/constants.ts
@@ -183,7 +183,7 @@ const JOB_TTL: { [id in JobType]: number } = {
183 'video-file-import': 1000 * 3600, // 1 hour 183 'video-file-import': 1000 * 3600, // 1 hour
184 'video-transcoding': 1000 * 3600 * 48, // 2 days, transcoding could be long 184 'video-transcoding': 1000 * 3600 * 48, // 2 days, transcoding could be long
185 'video-studio-edition': 1000 * 3600 * 10, // 10 hours 185 'video-studio-edition': 1000 * 3600 * 10, // 10 hours
186 'video-import': 1000 * 3600 * 2, // 2 hours 186 'video-import': CONFIG.IMPORT.VIDEOS.TIMEOUT,
187 'email': 60000 * 10, // 10 minutes 187 'email': 60000 * 10, // 10 minutes
188 'actor-keys': 60000 * 20, // 20 minutes 188 'actor-keys': 60000 * 20, // 20 minutes
189 'videos-views-stats': undefined, // Unlimited 189 'videos-views-stats': undefined, // Unlimited
diff --git a/server/lib/schedulers/geo-ip-update-scheduler.ts b/server/lib/schedulers/geo-ip-update-scheduler.ts
index 9dda6d76c..b06f5a9b5 100644
--- a/server/lib/schedulers/geo-ip-update-scheduler.ts
+++ b/server/lib/schedulers/geo-ip-update-scheduler.ts
@@ -6,7 +6,7 @@ export class GeoIPUpdateScheduler extends AbstractScheduler {
6 6
7 private static instance: AbstractScheduler 7 private static instance: AbstractScheduler
8 8
9 protected schedulerIntervalMs = SCHEDULER_INTERVALS_MS.YOUTUBE_DL_UPDATE 9 protected schedulerIntervalMs = SCHEDULER_INTERVALS_MS.GEO_IP_UPDATE
10 10
11 private constructor () { 11 private constructor () {
12 super() 12 super()