mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-05-02 17:34:50 -04:00
Convert federation client to async/await. (#7975)
This commit is contained in:
parent
4cce8ef74e
commit
c978f6c451
18 changed files with 209 additions and 221 deletions
|
@ -609,13 +609,15 @@ class SynapseCmd(cmd.Cmd):
|
|||
|
||||
@defer.inlineCallbacks
|
||||
def _do_event_stream(self, timeout):
|
||||
res = yield self.http_client.get_json(
|
||||
self._url() + "/events",
|
||||
{
|
||||
"access_token": self._tok(),
|
||||
"timeout": str(timeout),
|
||||
"from": self.event_stream_token,
|
||||
},
|
||||
res = yield defer.ensureDeferred(
|
||||
self.http_client.get_json(
|
||||
self._url() + "/events",
|
||||
{
|
||||
"access_token": self._tok(),
|
||||
"timeout": str(timeout),
|
||||
"from": self.event_stream_token,
|
||||
},
|
||||
)
|
||||
)
|
||||
print(json.dumps(res, indent=4))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue