fanout / django-eventstream

Server-Sent Events for Django
MIT License
638 stars 84 forks source link

trim_event_log inefficient #93

Open Schlepptop opened 2 years ago

Schlepptop commented 2 years ago

Is there a reason to not use a single delete statement when trimming the event log? The code creates a query for every single event that needs to be deleted. I can create a PR if that's unintentional.

jkarneges commented 2 years ago

I think it's unintentional. There's already EVENT_TRIM_BATCH to limit the size of the bulk deletes. PR welcome. :)