Opened 15 years ago

Closed 14 years ago

#1103 closed enhancement (wontfix)

startproject should create a 'cron job' and 'archive' binary for sessions

Reported by: Ian@… 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


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 Changed 15 years ago by ian@…

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

comment:2 Changed 14 years ago by Adrian Holovaty

priority: normallow
Severity: normalminor

comment:3 Changed 14 years ago by Michael Radziej <mir@…>

Triage Stage: UnreviewedDesign decision needed

comment:4 Changed 14 years ago by ludvig.ericson@…

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 Changed 14 years ago by cephelo@…

Set up source:django/trunk/django/bin/ 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 Changed 14 years ago by Malcolm Tredinnick

Resolution: wontfix
Status: newclosed

These sorts of activities vary a bit based on each project. I think this is outside the scope of, since it's easy enough to do anyway.

Note: See TracTickets for help on using tickets.
Back to Top