mirror of https://github.com/zulip/zulip.git
7988aad159
Rather than use a bulk insert via Django, use the faster `bulk_insert_all_ums` that we already have. This also adds a `ON CONFLICT` clause, to make the insert resilient to race conditions. There are currently two callsites, with different desired `ON CONFLICT` behaviours: - For `notify_reaction_update`, if the `UserMessage` had already been created, we would have done nothing to change it. - For `do_update_message_flags`, we would have ensured a specific bit was (un)set. Extend `create_historical_user_messages` and `bulk_insert_all_ums` to support `ON CONFLICT (...) UPDATE SET flags = ...`. |
||
---|---|---|
.. | ||
actions | ||
data_import | ||
integration_fixtures/nagios | ||
lib | ||
management | ||
migrations | ||
models | ||
openapi | ||
tests | ||
tornado | ||
transaction_tests | ||
views | ||
webhooks | ||
worker | ||
__init__.py | ||
apps.py | ||
context_processors.py | ||
decorator.py | ||
filters.py | ||
forms.py | ||
logging_handlers.py | ||
middleware.py | ||
signals.py |