Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to configure it to auto-clear older then n records? #774

Open
TheKalpit opened this issue Feb 20, 2025 · 0 comments
Open

How to configure it to auto-clear older then n records? #774

TheKalpit opened this issue Feb 20, 2025 · 0 comments

Comments

@TheKalpit
Copy link

How do I configure django-silk to delete (DB records & .prof files) older than x, say keep only last 1000 records?

I added the following in settings:

SILKY_MAX_RECORDED_REQUESTS = 1000
SILKY_MAX_RECORDED_REQUESTS_CHECK_PERCENT = 50

Doesn't seem to work. In fact, the server terminates without any error once the limit is reached.
I'm aware of the management command to clear the records, but that's a manual task (or additional effort to automate it). Is there a built-in way to do this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant