mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-12 04:25:31 +08:00
c971ed03e2
Summary: Sequelize can sometimes return promises that will never resolve or reject. We can wrap the promises we get back from sequelize in a bluebird promise which gives us the ability to timeout these abandoned promises. This way, we can track down issues in sequelize as well as unblocking stuck sync loops. Test Plan: Run locally, verify that timeouts occur Reviewers: juan, evan, spang Reviewed By: evan Differential Revision: https://phab.nylas.com/D4192
19 lines
575 B
JavaScript
19 lines
575 B
JavaScript
/* eslint global-require: 0 */
|
|
import Sequelize from 'sequelize'; // eslint-disable-line
|
|
import {ComponentRegistry} from 'nylas-exports'
|
|
import {createLogger} from './src/shared/logger'
|
|
import shimSequelize from './src/shared/shim-sequelize'
|
|
|
|
export function activate() {
|
|
shimSequelize(Sequelize);
|
|
global.Logger = createLogger()
|
|
require('./src/local-api');
|
|
require('./src/local-sync-worker');
|
|
|
|
const Root = require('./src/local-sync-dashboard/root').default;
|
|
ComponentRegistry.register(Root, {role: 'Developer:LocalSyncUI'});
|
|
}
|
|
|
|
export function deactivate() {
|
|
|
|
}
|