Make jobs use built-in job logging
This commit is contained in:
@@ -18,13 +18,15 @@ class PushNotifyJob extends Job {
|
||||
const notify = user.notify_config
|
||||
if ( !notify || !notify.active ) throw new Error('User does not have notifications configured.')
|
||||
|
||||
this.output.info(`Sending notification to ${user.uid}...`)
|
||||
this.info(`Sending notification to ${user.uid}...`)
|
||||
|
||||
await notify.send({ title, message, priority })
|
||||
} catch (e) {
|
||||
this.output.error(e)
|
||||
this.error(e)
|
||||
throw e
|
||||
}
|
||||
this.output.success(`Notification sent!`)
|
||||
|
||||
this.success(`Notification sent!`)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user