5 Commits

Author SHA1 Message Date
Klaas van Schelven
354edc81f9 Use django.utils._os.safe_join to construct paths
Even though '_os' suggests a private interface, this is likely to be stable
(for our purposes, i.e. may get more secure); if it ever isn't our tests
will expose it.

See #173
2025-07-29 22:23:37 +02:00
Klaas van Schelven
fe5527308c (extra) check on storage event_id uuid-ness before using in filenames 2025-07-29 15:08:02 +02:00
Klaas van Schelven
212882e65d Add cleanup_eventstorage command 2025-02-14 17:06:56 +01:00
Klaas van Schelven
3ccef7fd50 FileEventStorage: create dir on-demand; fix and add tests 2025-02-12 21:19:18 +01:00
Klaas van Schelven
5559fba754 Introduce FileEventStorage
An (optional) way to store the `event_data` (full event as JSON)
outside the DB. This is expected to be useful for larger setups,
because it gives you:

* A more portable database (e.g. backups); (depeding on event size
  the impact on your DB is ~50x.
* Less worries about hitting "physical" limits (e.g. disk size, max
  file size) for your DB.

Presumably (more testing will happen going forwards) it will:

* Speed up migrations (especially on sqlite, which does full table
  copies)
* Speed up event ingestion(?)

Further improvements in this commit:

* `delete_with_limit` was removed; this removes one tie-in to MySQL/Sqlite
    (See #21 for this bullet)
2025-02-12 17:11:24 +01:00