Remove unused Backend.await_model_item()

This commit is contained in:
miruka 2020-05-21 20:45:48 -04:00
parent 8c9b5267e9
commit fb975fad71
2 changed files with 0 additions and 24 deletions

View File

@ -1,7 +1,6 @@
# TODO
- pdb
- remove await_model_item
- uplaod/download use kwargs
- highlight messages being responded to
- highlight messages with mention

View File

@ -308,29 +308,6 @@ class Backend:
return (settings, ui_state, history, theme)
async def await_model_item(
self, model_id: SyncId, item_id: Any,
) -> Dict[str, Any]:
if isinstance(model_id, list): # when called from QML
model_id = tuple(model_id)
failures = 0
while True:
try:
return self.models[model_id][item_id].serialized
except KeyError:
if failures and failures % 300 == 0:
log.warn(
"Item %r not found in model %r after %ds",
item_id, model_id, failures / 10,
)
await asyncio.sleep(0.1)
failures += 1
async def set_substring_filter(self, model_id: SyncId, value: str) -> None:
"""Set a FieldSubstringFilter model's filter property.