make eventlogger module a global plugin

This commit is contained in:
holger krekel
2020-02-23 17:43:29 +01:00
parent 0d4b6f5627
commit 79f5e736b0
6 changed files with 74 additions and 54 deletions

View File

@@ -47,10 +47,6 @@ class PerAccount:
def process_message_delivered(self, message):
""" Called when an outgoing message has been delivered to SMTP. """
@account_hookspec
def after_shutdown(self):
""" Called after the account has been shutdown. """
class Global:
""" global hook specifications using a per-process singleton plugin manager instance.
@@ -66,5 +62,10 @@ class Global:
return cls._plugin_manager
@global_hookspec
def at_account_init(self, account):
def account_init(self, account):
""" called when `Account::__init__()` function starts executing. """
@global_hookspec
def account_after_shutdown(self, account, dc_context):
""" Called after the account has been shutdown. """