diff options
author | Chocobozzz <me@florianbigard.com> | 2022-08-02 15:29:00 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-08-02 15:50:05 +0200 |
commit | 22df69fdecf299c8be6acaa25f086249ea9a0085 (patch) | |
tree | e8c7e21c18fb42bb74b54f2eab1509c3d93a380d /client/src/root-helpers/plugins-manager.ts | |
parent | 7a9e420a02434e4f16c99e7d58da9075dff25d15 (diff) | |
download | PeerTube-22df69fdecf299c8be6acaa25f086249ea9a0085.tar.gz PeerTube-22df69fdecf299c8be6acaa25f086249ea9a0085.tar.zst PeerTube-22df69fdecf299c8be6acaa25f086249ea9a0085.zip |
Add job queue hooks
Diffstat (limited to 'client/src/root-helpers/plugins-manager.ts')
-rw-r--r-- | client/src/root-helpers/plugins-manager.ts | 10 |
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 | ||