zulip/analytics/management/commands
Mateusz Mandera 634015411a update_analytics_count: Use a correct lock mechanism.
Adds a re-usable lockfile_nonblocking helper to context_managers.

Relying on naive `os.mkdir` is not enough especially now that the
successful operation of this command is necessary for push notifications
to work for many servers.

We can't use `lockfile` context manager from
`zerver.lib.context_managers`, because we want the custom behavior of
failing if the lock can't be acquired, instead of waiting.
That's because if an instance of this gets stuck, we don't want to start
queueing up more processes waiting forever whenever the cronjob runs
again and fail->exit is preferrable instead.
2024-03-05 10:21:14 -08:00
..
__init__.py
check_analytics_state.py counts: Add new mobile_pushes RemoteRealmCount stats. 2023-11-10 16:09:11 -08:00
clear_analytics_tables.py mypy: Enable new error explicit-override. 2023-10-12 12:28:41 -07:00
clear_single_stat.py counts: Add new mobile_pushes RemoteRealmCount stats. 2023-11-10 16:09:11 -08:00
populate_analytics_db.py models: Extract zerver.models.groups. 2023-12-16 22:08:44 -08:00
update_analytics_counts.py update_analytics_count: Use a correct lock mechanism. 2024-03-05 10:21:14 -08:00