zulip/analytics
Mateusz Mandera 96001b19fc 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.

(cherry picked from commit f61ed58c8f)
2024-03-07 15:01:15 -08:00
..
lib push-bouncer: Exclude LoggingCountStats with partial data. 2024-03-01 09:26:25 -08:00
management update_analytics_count: Use a correct lock mechanism. 2024-03-07 15:01:15 -08:00
migrations analytics: Regenerate partial indexes due to Django bug. 2023-11-16 13:53:04 -08:00
tests tests: Clear in-memory Client caches before testing query counts. 2024-03-07 09:48:20 -08:00
views requirements: Upgrade Python requirements. 2024-02-16 12:17:34 -08:00
__init__.py
models.py python: Consistently use from…import for datetime. 2023-12-05 12:01:18 -08:00
urls.py analytics: More fixes to zilencer urls import logic. 2023-12-05 10:52:00 -08:00