aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/tests/fixtures/peertube-plugin-test
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-08-02 15:29:00 +0200
committerChocobozzz <me@florianbigard.com>2022-08-02 15:50:05 +0200
commit22df69fdecf299c8be6acaa25f086249ea9a0085 (patch)
treee8c7e21c18fb42bb74b54f2eab1509c3d93a380d /server/tests/fixtures/peertube-plugin-test
parent7a9e420a02434e4f16c99e7d58da9075dff25d15 (diff)
downloadPeerTube-22df69fdecf299c8be6acaa25f086249ea9a0085.tar.gz
PeerTube-22df69fdecf299c8be6acaa25f086249ea9a0085.tar.zst
PeerTube-22df69fdecf299c8be6acaa25f086249ea9a0085.zip
Add job queue hooks
Diffstat (limited to 'server/tests/fixtures/peertube-plugin-test')
-rw-r--r--server/tests/fixtures/peertube-plugin-test/main.js26
1 files changed, 25 insertions, 1 deletions
diff --git a/server/tests/fixtures/peertube-plugin-test/main.js b/server/tests/fixtures/peertube-plugin-test/main.js
index 2f3809215..f62f6a435 100644
--- a/server/tests/fixtures/peertube-plugin-test/main.js
+++ b/server/tests/fixtures/peertube-plugin-test/main.js
@@ -253,6 +253,27 @@ async function register ({ registerHook, registerSetting, settingsManager, stora
253 } 253 }
254 }) 254 })
255 255
256 registerHook({
257 target: 'filter:job-queue.process.params',
258 handler: (object, context) => {
259 peertubeHelpers.logger.debug('TOTO.', { object, context })
260
261 if (context.type !== 'video-studio-edition') return object
262
263 object.data.tasks = [
264 {
265 name: 'cut',
266 options: {
267 start: 0,
268 end: 1
269 }
270 }
271 ]
272
273 return object
274 }
275 })
276
256 // Upload/import/live attributes 277 // Upload/import/live attributes
257 for (const target of [ 278 for (const target of [
258 'filter:api.video.upload.video-attribute.result', 279 'filter:api.video.upload.video-attribute.result',
@@ -284,7 +305,10 @@ async function register ({ registerHook, registerSetting, settingsManager, stora
284 'filter:api.search.video-playlists.index.list.result', 305 'filter:api.search.video-playlists.index.list.result',
285 306
286 'filter:api.overviews.videos.list.params', 307 'filter:api.overviews.videos.list.params',
287 'filter:api.overviews.videos.list.result' 308 'filter:api.overviews.videos.list.result',
309
310 'filter:job-queue.process.params',
311 'filter:job-queue.process.result'
288 ] 312 ]
289 313
290 for (const h of filterHooks) { 314 for (const h of filterHooks) {