Opened 10 years ago

Closed 8 years ago

#1103 closed enhancement (wontfix)

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

Reported by: Ian@… Owned by: adrian
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: UI/UX:

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 Changed 10 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 9 years ago by adrian

  • priority changed from normal to low
  • Severity changed from normal to minor

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

  • Triage Stage changed from Unreviewed to Design decision needed

comment:4 Changed 9 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 9 years ago by cephelo@…

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 Changed 8 years ago by mtredinnick

  • Resolution set to wontfix
  • Status changed from new to 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.

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