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: 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

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 ian@…, 19 years ago

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 by Adrian Holovaty, 18 years ago

priority: normallow
Severity: normalminor

comment:3 by Michael Radziej <mir@…>, 18 years ago

Triage Stage: UnreviewedDesign decision needed

comment:4 by ludvig.ericson@…, 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 cephelo@…, 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 Malcolm Tredinnick, 18 years ago

Resolution: wontfix
Status: newclosed

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.

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