Mailspring/internal_packages/search-index/lib/main.es6
Evan Morikawa 1526bbc31b reafctor(scheduler): Move SearchIndexer -> SearchIndexScheduler
Summary:
This renames `SearchIndexer` to `SearchIndexScheduler`

It also moves it out of internal_packages and into src/ since this is now
used across packages (like in Salesforce).

It also makes the class a Singleton and exports that instead so we don't
need to pass it via `activate`. The `activate` method of many stores and
packages are designed to be argumentless.

Test Plan:
Boot up Nylas and ensure it's still indexing threads properly.
Also allows Salesforce to bootup with the SalesforceSearchIndexer

Reviewers: juan, mark

Reviewed By: mark

Differential Revision: https://phab.nylas.com/D3911
2017-02-15 11:32:45 -08:00

17 lines
555 B
JavaScript

import ThreadSearchIndexStore from './thread-search-index-store'
import ContactSearchIndexer from './contact-search-indexer'
// import EventSearchIndexer from './event-search-indexer'
export function activate() {
ThreadSearchIndexStore.activate()
ContactSearchIndexer.activate()
// TODO Calendar feature has been punted, we will disable this indexer for now
// EventSearchIndexer.activate(indexer)
}
export function deactivate() {
ThreadSearchIndexStore.deactivate()
ContactSearchIndexer.deactivate()
// EventSearchIndexer.deactivate()
}