mirror of
https://github.com/element-hq/synapse.git
synced 2025-03-31 03:45:13 +00:00
deploy: 19e51b14d2
This commit is contained in:
parent
376bcc2e6d
commit
1e4f6a5c57
4 changed files with 4 additions and 4 deletions
|
@ -227,7 +227,7 @@ the username <code>matrix</code>:</p>
|
|||
<p>This gives a Python REPL in which <code>hs</code> gives access to the
|
||||
<code>synapse.server.HomeServer</code> object - which in turn gives access to many other
|
||||
parts of the process.</p>
|
||||
<p>Note that any call which returns a coroutine will need to be wrapped in <code>ensureDeferred</code>.</p>
|
||||
<p>Note that, prior to Synapse 1.41, any call which returns a coroutine will need to be wrapped in <code>ensureDeferred</code>.</p>
|
||||
<p>As a simple example, retrieving an event from the database:</p>
|
||||
<pre><code class="language-pycon">>>> from twisted.internet import defer
|
||||
>>> defer.ensureDeferred(hs.get_datastore().get_event('$1416420717069yeQaw:matrix.org'))
|
||||
|
|
|
@ -10845,7 +10845,7 @@ the username <code>matrix</code>:</p>
|
|||
<p>This gives a Python REPL in which <code>hs</code> gives access to the
|
||||
<code>synapse.server.HomeServer</code> object - which in turn gives access to many other
|
||||
parts of the process.</p>
|
||||
<p>Note that any call which returns a coroutine will need to be wrapped in <code>ensureDeferred</code>.</p>
|
||||
<p>Note that, prior to Synapse 1.41, any call which returns a coroutine will need to be wrapped in <code>ensureDeferred</code>.</p>
|
||||
<p>As a simple example, retrieving an event from the database:</p>
|
||||
<pre><code class="language-pycon">>>> from twisted.internet import defer
|
||||
>>> defer.ensureDeferred(hs.get_datastore().get_event('$1416420717069yeQaw:matrix.org'))
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue