Opened 19 years ago
Closed 18 years ago
#1103 closed enhancement (wontfix)
startproject should create a 'cron job' and 'archive' binary for sessions
Reported by: | Owned by: | Adrian Holovaty | |
---|---|---|---|
Component: | Core (Other) | Version: | |
Severity: | minor | Keywords: | |
Cc: | Triage Stage: | Design decision needed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
as part of the 'core' application it creates a session table, which creates a record for every 'session' (visitor) who has looked at your site.
obviously this will grow to be quite large on popular sites.
I propose that django-admin startproject creates a archive script which can fire an event to 'archive' which applications can register interest in. (and this could be put into a crontab or whatever to be run regularly)
Change History (6)
comment:1 by , 19 years ago
comment:2 by , 18 years ago
priority: | normal → low |
---|---|
Severity: | normal → minor |
comment:3 by , 18 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
comment:4 by , 18 years ago
I think the approach should be more to the PHP way; a GC trigger chance that deletes old sessions based on cookie start-TTL.
comment:5 by , 18 years ago
Set up source:django/trunk/django/bin/daily_cleanup.py on a cron that runs at whatever interval you'd like. Random "GC" like PHP has makes it more difficult to debug, whereas a cron is entirely predictable.
comment:6 by , 18 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
These sorts of activities vary a bit based on each project. I think this is outside the scope of django-admin.py, since it's easy enough to do anyway.
2nd approach to it ;-) thanks hugo.
hugo-: there is one in the bin/ directory, but that one talks about the sessions and the registration challenges - but the latter one are only in ellington, not Django
hugo-: it could be useful to extend that one to use some kind of hooks into the model classes - if those provide a "make_clean" function, that one is called in the daily cleanup