Optimize handle_send by ensuring a payload is sent only once per endpoint.

various-fixes
Alain St-Denis 2023-02-25 11:53:44 -05:00
rodzic 1ca67c987e
commit 8d8e10b7b3
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -167,7 +167,7 @@ def handle_send(
logger.debug('handle_send - length of recipients: %s', len(recipients))
# Flatten to unique recipients
# TODO supply a callable that empties "fid" in the case that public=True
unique_recipients = list(unique_everseen(recipients))
unique_recipients = list(unique_everseen(recipients, key=lambda val: val['endpoints']))
logger.debug('handle_send - length of unique_recipients: %s', len(unique_recipients))
logger.debug('handle_send / unique_recipients - %s', unique_recipients)