X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=src%2Fmanager.js;h=fddc8e45ae6f272a346c2131a05d909c190d03d9;hb=a0d01a7dbd5ff438095980c491ddc548ee29e96a;hp=b3aff45da975952ea8ad27d51aa058823348cbdd;hpb=9696c012e6b9a6c58904baa397ca0ebf78112316;p=websub-hub diff --git a/src/manager.js b/src/manager.js index b3aff45..fddc8e4 100644 --- a/src/manager.js +++ b/src/manager.js @@ -40,7 +40,7 @@ class Manager { * @param {http.ServerResponse} res * @param {object} ctx */ - async getHealthcheck(res, ctx) { + async getHealthcheck(res, ctx) { const _scope = _fileScope('getHealthcheck'); const health = 'happy'; @@ -342,7 +342,7 @@ class Manager { let fn, info, id; try { if (data.mode === Enum.Mode.Publish) { - fn = 'topicPublish'; + fn = 'topicFetchRequested'; info = await this.db.topicFetchRequested(dbCtx, data.topicId); id = data.topicId; } else { @@ -366,7 +366,7 @@ class Manager { fn = 'topicFetchClaimAndProcessById'; await this.communication.topicFetchClaimAndProcessById(dbCtx, id, requestId); } else { - fn = 'processVerification'; + fn = 'verificationClaimAndProcessById'; await this.communication.verificationClaimAndProcessById(dbCtx, id, requestId); } } catch (e) { @@ -666,7 +666,9 @@ class Manager { this.logger.debug(_scope, 'called', { ctx }); // N.B. no await on this - this.communication.worker.process(); + this.communication.worker.process().catch((e) => { + this.logger.error(_scope, 'failed', { error: e, ctx }); + }); res.end(); this.logger.info(_scope, 'invoked worker process', { ctx });