mirror of
https://github.com/chatmail/core.git
synced 2026-04-06 15:42:10 +03:00
add after_shutdown hook
This commit is contained in:
@@ -522,6 +522,7 @@ class Account(object):
|
||||
deltachat.clear_context_callback(self._dc_context)
|
||||
del self._dc_context
|
||||
atexit.unregister(self.shutdown)
|
||||
self._pm.hook.after_shutdown()
|
||||
|
||||
def set_location(self, latitude=0.0, longitude=0.0, accuracy=0.0):
|
||||
"""set a new location. It effects all chats where we currently
|
||||
|
||||
@@ -31,6 +31,10 @@ class PerAccount:
|
||||
def log_line(self, message):
|
||||
""" log a message related to the account. """
|
||||
|
||||
@account_hookspec
|
||||
def after_shutdown(self):
|
||||
""" Called when the account has been shutdown. """
|
||||
|
||||
@account_hookspec
|
||||
def configure_completed(self, success):
|
||||
""" Called when a configure process completed. """
|
||||
|
||||
@@ -38,6 +38,8 @@ class ConfigureFailed(RuntimeError):
|
||||
|
||||
|
||||
class ConfigureTracker:
|
||||
ConfigureFailed = ConfigureFailed
|
||||
|
||||
def __init__(self):
|
||||
self._configure_events = Queue()
|
||||
self._smtp_finished = Event()
|
||||
|
||||
Reference in New Issue
Block a user