diff options
author | NavaL <mnandri@thoughtworks.com> | 2016-02-03 17:23:42 +0100 |
---|---|---|
committer | NavaL <mnandri@thoughtworks.com> | 2016-02-05 14:43:07 +0100 |
commit | e7f77052f0aba1b84febf0ab1382c9602bbf7f93 (patch) | |
tree | 5fd8dd1016cbb21ebd4572284ca84f24bd9ccfa1 /service/pixelated/config | |
parent | 92f0e9887a216e0ec82355941655d3deebf2d422 (diff) |
closing the services closes leap session, which stops background tasks, close soldedad and remove it from cache
Issue #586
Diffstat (limited to 'service/pixelated/config')
-rw-r--r-- | service/pixelated/config/services.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/service/pixelated/config/services.py b/service/pixelated/config/services.py index 3f254571..de0e2537 100644 --- a/service/pixelated/config/services.py +++ b/service/pixelated/config/services.py @@ -25,16 +25,13 @@ class Services(object): @defer.inlineCallbacks def setup(self): search_index_storage_key = self._setup_search_index_storage_key(self._leap_session.soledad) - yield self._setup_search_engine( - self._leap_session.user_auth.uuid, - search_index_storage_key) + yield self._setup_search_engine(self._leap_session.user_auth.uuid, search_index_storage_key) self._wrap_mail_store_with_indexing_mail_store(self._leap_session) yield listen_all_mailboxes(self._leap_session.account, self.search_engine, self._leap_session.mail_store) - self.mail_service = self._setup_mail_service( - self.search_engine) + self.mail_service = self._setup_mail_service(self.search_engine) self.keymanager = self._leap_session.nicknym self.draft_service = self._setup_draft_service(self._leap_session.mail_store) @@ -42,6 +39,9 @@ class Services(object): yield self._index_all_mails() + def close(self): + self._leap_session.close() + def _wrap_mail_store_with_indexing_mail_store(self, leap_session): leap_session.mail_store = SearchableMailStore(leap_session.mail_store, self.search_engine) |