django-background-tasks icon indicating copy to clipboard operation
django-background-tasks copied to clipboard

settings for background_task_completedtask table

Open q121212 opened this issue 6 years ago • 3 comments

my app used this background_task sheduller for repeated tasks, and repeat interval is very short (a few secodns). Over a long period the table (background_task_completedtask table) will become very large and since there are many indexes there, it will be problematic to delete these logs. I want to advance in a more optimal way to solve this problem.

I think - good idea - add configuration for completed tasks logging, for example - logging only failed tasks..

As another solution - truncate table sometimes, but interesting events\tasks also would be lost(

q121212 avatar Jun 14 '19 11:06 q121212

I suggest to implement a clean up routine that is called by a repetitive background task as well. Remove the unused entries and keep the interesting events.

philippeowagner avatar Jul 01 '19 08:07 philippeowagner

"I think - good idea - add configuration for completed tasks logging, for example - logging only failed tasks."

We should accept such a PR.

philippeowagner avatar Dec 11 '19 13:12 philippeowagner

Where would that kind of config go? ideally I think I'd want to put it on the @background decorator...

michaelwiles avatar Mar 30 '20 15:03 michaelwiles