Apply suggestions from code review
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>pull/8439/head
parent
2067dc7b0f
commit
f709da9e05
|
@ -17,9 +17,9 @@
|
|||
-- A unique and immutable mapping between instance name and an integer ID. This
|
||||
-- lets us refer to instances via a small ID in e.g. stream tokens, without
|
||||
-- having to encode the full name.
|
||||
CREATE TABLE instance_map (
|
||||
CREATE TABLE IF NOT EXISTS instance_map (
|
||||
instance_id SERIAL PRIMARY KEY,
|
||||
instance_name TEXT NOT NULL
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX instance_map_idx ON instance_map(instance_name);
|
||||
CREATE UNIQUE INDEX IF NOT EXISTS instance_map_idx ON instance_map(instance_name);
|
||||
|
|
|
@ -1226,7 +1226,7 @@ class StreamWorkerStore(EventsWorkerStore, SQLBaseStore, metaclass=abc.ABCMeta):
|
|||
|
||||
@cached()
|
||||
async def get_id_for_instance(self, instance_name: str) -> int:
|
||||
"""Get a unique, immutable ID that corresponds to the instance.
|
||||
"""Get a unique, immutable ID that corresponds to the given Synapse worker instance.
|
||||
"""
|
||||
|
||||
def _get_id_for_instance_txn(txn):
|
||||
|
|
Loading…
Reference in New Issue