4d01e13a84
* 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>
20 lines
464 B
JavaScript
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
|
|
}
|