mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 02:39:33 +02:00
Add job queue hooks
This commit is contained in:
parent
7a9e420a02
commit
22df69fdec
12 changed files with 151 additions and 26 deletions
|
@ -215,8 +215,12 @@ export class PluginManager implements ServerHook {
|
|||
for (const hook of this.hooks[hookName]) {
|
||||
logger.debug('Running hook %s of plugin %s.', hookName, hook.npmName)
|
||||
|
||||
result = await internalRunHook(hook.handler, hookType, result, params, err => {
|
||||
logger.error('Cannot run hook %s of plugin %s.', hookName, hook.pluginName, { err })
|
||||
result = await internalRunHook({
|
||||
handler: hook.handler,
|
||||
hookType,
|
||||
result,
|
||||
params,
|
||||
onError: err => { logger.error('Cannot run hook %s of plugin %s.', hookName, hook.pluginName, { err }) }
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue