Mailspring/packages/client-sync/main.es6
Mark Hahnenberg c971ed03e2 [client-sync] Shim sequelize to timeout after 1 minute
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
2017-03-10 13:39:27 -08:00

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() {
}