mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
Log when ASes are registered/unregistered.
This commit is contained in:
parent
ec3719b583
commit
fbeaeb8689
@ -31,6 +31,7 @@ class ApplicationServicesHandler(BaseHandler):
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def register(self, app_service):
|
||||
logger.info("Register -> %s", app_service)
|
||||
# check the token is recognised
|
||||
try:
|
||||
stored_service = yield self.store.get_app_service(app_service.token)
|
||||
@ -44,6 +45,7 @@ class ApplicationServicesHandler(BaseHandler):
|
||||
# TODO store this AS
|
||||
|
||||
def unregister(self, token):
|
||||
logger.info("Unregister as_token=%s", token)
|
||||
yield self.store.unregister_app_service(token)
|
||||
|
||||
def notify_interested_services(self, event):
|
||||
|
@ -51,6 +51,9 @@ class ApplicationService(object):
|
||||
|
||||
return True
|
||||
|
||||
def __str__(self):
|
||||
return "ApplicationService: %s" % (self.__dict__,)
|
||||
|
||||
|
||||
class ApplicationServiceCache(object):
|
||||
"""Caches ApplicationServices and provides utility functions on top.
|
||||
@ -83,7 +86,6 @@ class ApplicationServiceStore(SQLBaseStore):
|
||||
def __init__(self, hs):
|
||||
super(ApplicationServiceStore, self).__init__(hs)
|
||||
self.cache = ApplicationServiceCache()
|
||||
self.clock = hs.get_clock()
|
||||
self._populate_cache()
|
||||
|
||||
def unregister_app_service(self, token):
|
||||
|
Loading…
Reference in New Issue
Block a user