aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/lib/job-queue
diff options
context:
space:
mode:
authorJosh Morel <morel.josh@hotmail.com>2019-02-06 06:14:45 -0500
committerChocobozzz <chocobozzz@cpy.re>2019-02-07 14:49:28 +0100
commitf7effe8dc7c641388f7edbcaad716fc16321d794 (patch)
tree8831663b7f0aae469630a7f8b5ae5350d395c1cf /server/lib/job-queue
parent552dd3306fe867d8be30508ef9f30a1738241082 (diff)
downloadPeerTube-f7effe8dc7c641388f7edbcaad716fc16321d794.tar.gz
PeerTube-f7effe8dc7c641388f7edbcaad716fc16321d794.tar.zst
PeerTube-f7effe8dc7c641388f7edbcaad716fc16321d794.zip
don't notify prior to scheduled update
also increase timeouts on user-notification test
Diffstat (limited to 'server/lib/job-queue')
-rw-r--r--server/lib/job-queue/handlers/video-file.ts10
1 files changed, 7 insertions, 3 deletions
diff --git a/server/lib/job-queue/handlers/video-file.ts b/server/lib/job-queue/handlers/video-file.ts
index 593e43cc5..217d666b6 100644
--- a/server/lib/job-queue/handlers/video-file.ts
+++ b/server/lib/job-queue/handlers/video-file.ts
@@ -91,7 +91,8 @@ async function onVideoFileTranscoderOrImportSuccess (video: VideoModel) {
91 return { videoDatabase, videoPublished } 91 return { videoDatabase, videoPublished }
92 }) 92 })
93 93
94 if (videoPublished) { 94 // don't notify prior to scheduled video update
95 if (videoPublished && !videoDatabase.ScheduleVideoUpdate) {
95 Notifier.Instance.notifyOnNewVideo(videoDatabase) 96 Notifier.Instance.notifyOnNewVideo(videoDatabase)
96 Notifier.Instance.notifyOnPendingVideoPublished(videoDatabase) 97 Notifier.Instance.notifyOnPendingVideoPublished(videoDatabase)
97 } 98 }
@@ -149,8 +150,11 @@ async function onVideoFileOptimizerSuccess (videoArg: VideoModel, isNewVideo: bo
149 return { videoDatabase, videoPublished } 150 return { videoDatabase, videoPublished }
150 }) 151 })
151 152
152 if (isNewVideo) Notifier.Instance.notifyOnNewVideo(videoDatabase) 153 // don't notify prior to scheduled video update
153 if (videoPublished) Notifier.Instance.notifyOnPendingVideoPublished(videoDatabase) 154 if (!videoDatabase.ScheduleVideoUpdate) {
155 if (isNewVideo) Notifier.Instance.notifyOnNewVideo(videoDatabase)
156 if (videoPublished) Notifier.Instance.notifyOnPendingVideoPublished(videoDatabase)
157 }
154} 158}
155 159
156// --------------------------------------------------------------------------- 160// ---------------------------------------------------------------------------