mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Added sentry error capturing to email analytics jobs
no issue - jobs operate in their own process and so do not share any of the error capturing that is configured in the parent process
This commit is contained in:
parent
c40a8e978d
commit
a945ae7c02
2 changed files with 4 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
const logging = require('../../../../shared/logging');
|
||||
const {parentPort} = require('bthreads');
|
||||
const sentry = require('../../../../shared/sentry');
|
||||
const debug = require('ghost-ignition').debug('jobs:email-analytics:fetch-all');
|
||||
|
||||
// one-off job to fetch all available events and re-process them idempotently
|
||||
|
@ -61,6 +62,7 @@ if (parentPort) {
|
|||
}
|
||||
} catch (error) {
|
||||
logging.error(error);
|
||||
sentry.captureException(error);
|
||||
|
||||
// give the logging pipes time finish writing before exit
|
||||
setTimeout(() => {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
const logging = require('../../../../shared/logging');
|
||||
const {parentPort} = require('bthreads');
|
||||
const sentry = require('../../../../shared/sentry');
|
||||
const debug = require('ghost-ignition').debug('jobs:email-analytics:fetch-latest');
|
||||
|
||||
// recurring job to fetch analytics since the most recently seen event timestamp
|
||||
|
@ -62,6 +63,7 @@ if (parentPort) {
|
|||
}
|
||||
} catch (error) {
|
||||
logging.error(error);
|
||||
sentry.captureException(error);
|
||||
|
||||
// give the logging pipes time finish writing before exit
|
||||
setTimeout(() => {
|
||||
|
|
Loading…
Add table
Reference in a new issue