Files
speckle-server/packages/server/modules/comments/index.js
T
Iain Sproat 4d01e13a84 feat(structured logging) (#1242)
* Revert "Revert structured logging 2 (#1240)"
This reverts commit 78ecaeffcb.
* Logging should not be bundled into core shared directory
* making sure observability stuff isnt bundled into frontend


Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
2022-12-06 11:51:18 +00:00

20 lines
464 B
JavaScript

const { moduleLogger } = require('@/logging/logging')
const {
notifyUsersOnCommentEvents
} = require('@/modules/comments/services/notifications')
let unsubFromEvents
exports.init = async (_, isInitial) => {
moduleLogger.info('🗣 Init comments module')
if (isInitial) {
unsubFromEvents = await notifyUsersOnCommentEvents()
}
}
exports.finalize = async () => {}
exports.shutdown = async () => {
unsubFromEvents?.()
unsubFromEvents = undefined
}