Fix some comments and types in service notices (#7996)

This commit is contained in:
Patrick Cloke 2020-07-31 16:22:06 -04:00 committed by GitHub
parent 394be6a0e6
commit d1008fe949
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 56 additions and 59 deletions

View file

@ -12,7 +12,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from twisted.internet import defer
class WorkerServerNoticesSender(object):
@ -24,24 +23,18 @@ class WorkerServerNoticesSender(object):
hs (synapse.server.HomeServer):
"""
def on_user_syncing(self, user_id):
async def on_user_syncing(self, user_id: str) -> None:
"""Called when the user performs a sync operation.
Args:
user_id (str): mxid of user who synced
Returns:
Deferred
user_id: mxid of user who synced
"""
return defer.succeed(None)
return None
def on_user_ip(self, user_id):
async def on_user_ip(self, user_id: str) -> None:
"""Called on the master when a worker process saw a client request.
Args:
user_id (str): mxid
Returns:
Deferred
user_id: mxid
"""
raise AssertionError("on_user_ip unexpectedly called on worker")