From 22df69fdecf299c8be6acaa25f086249ea9a0085 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 2 Aug 2022 15:29:00 +0200 Subject: Add job queue hooks --- client/src/root-helpers/plugins-manager.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'client/src') 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 { for (const hook of this.hooks[hookName]) { logger.info(`Running hook ${hookName} of plugin ${hook.plugin.name}`) - result = await internalRunHook(hook.handler, hookType, result, params, err => { - logger.error(`Cannot run hook ${hookName} of script ${hook.clientScript.script} of plugin ${hook.plugin.name}`, err) + result = await internalRunHook({ + handler: hook.handler, + hookType, + result, + params, + onError: err => { + logger.error(`Cannot run hook ${hookName} of script ${hook.clientScript.script} of plugin ${hook.plugin.name}`, err) + } }) } -- cgit v1.2.3