|
@ -258,9 +258,9 @@ There are separate Django management commands for each task: |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
* Remove user accounts that match either of these conditions: |
|
|
* Remove user accounts that match either of these conditions: |
|
|
* Account was created more than 6 months ago, and user has never logged in. |
|
|
|
|
|
|
|
|
* Account was created more than 6 months ago, and user has never logged in. |
|
|
These can happen when user enters invalid email address when signing up. |
|
|
These can happen when user enters invalid email address when signing up. |
|
|
* Last login was more than 6 months ago, and the account has no checks. |
|
|
|
|
|
|
|
|
* Last login was more than 6 months ago, and the account has no checks. |
|
|
Assume the user doesn't intend to use the account any more and would |
|
|
Assume the user doesn't intend to use the account any more and would |
|
|
probably *want* it removed. |
|
|
probably *want* it removed. |
|
|
|
|
|
|
|
@ -268,6 +268,14 @@ There are separate Django management commands for each task: |
|
|
$ ./manage.py pruneusers |
|
|
$ ./manage.py pruneusers |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
|
|
|
* Remove old records fromt he `api_tokenbucket` table. The TokenBucket |
|
|
|
|
|
model is used for rate-limiting login attempts and similar operations. |
|
|
|
|
|
Any records older than one day can be safely removed. |
|
|
|
|
|
|
|
|
|
|
|
``` |
|
|
|
|
|
$ ./manage.py prunetokenbucket |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
When you first try these commands on your data, it is a good idea to |
|
|
When you first try these commands on your data, it is a good idea to |
|
|
test them on a copy of your database, not on the live database right away. |
|
|
test them on a copy of your database, not on the live database right away. |
|
|
In a production setup, you should also have regular, automated database |
|
|
In a production setup, you should also have regular, automated database |
|
|