Ghost/core/server/services/email-analytics/index.js
Sam Lord 97451a93cb
Extract logging from DI patterns, only use @tryghost/logging package
refs: https://github.com/TryGhost/Toolbox/issues/146

Switched to @tryghost/logging instead of passing around the library. The main sticking points of this change are jobs. When jobs are launched we don't want them to use a separate @tryghost/logging instance because they would start parallel rotation jobs. @tryghost/logging v2.x passes all logs to the parent process if run in a child process, so that we can use the same patterns in jobs and the rest of the codebase.
2021-12-06 18:00:55 +00:00

18 lines
609 B
JavaScript

const config = require('../../../shared/config');
const db = require('../../data/db');
const settings = require('../../../shared/settings-cache');
const {EmailAnalyticsService} = require('@tryghost/email-analytics-service');
const EventProcessor = require('./lib/event-processor');
const MailgunProvider = require('@tryghost/email-analytics-provider-mailgun');
const queries = require('./lib/queries');
module.exports = new EmailAnalyticsService({
config,
settings,
eventProcessor: new EventProcessor({db}),
providers: [
new MailgunProvider({config, settings})
],
queries
});