aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src
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 /client/src
parent7a9e420a02434e4f16c99e7d58da9075dff25d15 (diff)
downloadPeerTube-22df69fdecf299c8be6acaa25f086249ea9a0085.tar.gz
PeerTube-22df69fdecf299c8be6acaa25f086249ea9a0085.tar.zst
PeerTube-22df69fdecf299c8be6acaa25f086249ea9a0085.zip
Add job queue hooks
Diffstat (limited to 'client/src')
-rw-r--r--client/src/root-helpers/plugins-manager.ts10
1 files changed, 8 insertions, 2 deletions
diff --git a/client/src/root-helpers/plugins-manager.ts b/client/src/root-helpers/plugins-manager.ts
index 37a52be72..300f174b4 100644
--- a/client/src/root-helpers/plugins-manager.ts
+++ b/client/src/root-helpers/plugins-manager.ts
@@ -112,8 +112,14 @@ class PluginsManager {
112 for (const hook of this.hooks[hookName]) { 112 for (const hook of this.hooks[hookName]) {
113 logger.info(`Running hook ${hookName} of plugin ${hook.plugin.name}`) 113 logger.info(`Running hook ${hookName} of plugin ${hook.plugin.name}`)
114 114
115 result = await internalRunHook(hook.handler, hookType, result, params, err => { 115 result = await internalRunHook({
116 logger.error(`Cannot run hook ${hookName} of script ${hook.clientScript.script} of plugin ${hook.plugin.name}`, err) 116 handler: hook.handler,
117 hookType,
118 result,
119 params,
120 onError: err => {
121 logger.error(`Cannot run hook ${hookName} of script ${hook.clientScript.script} of plugin ${hook.plugin.name}`, err)
122 }
117 }) 123 })
118 } 124 }
119 125