On Jan 19, 4:26 pm, Jacob Kaplan-Moss <ja...@jacobian.org> wrote: > The next big one was the "startup signal" issue -- they've got lots of > code that needs to run at startup time, and there's no great mechanism > to do that currently. The core devs have talked about this one a *lot* > over the years, and it's obviously a hard one -- for one, there's no > clear definition of what "startup" means -- but a common theme seems > to be that bigger, more complex applications need some way to cleanly > run one-time, expensive startup tasks.
I've got a mechanism which I described in these posts: http://groups.google.com/group/django-developers/msg/2b94fa2017b07e67 and http://groups.google.com/group/django-developers/msg/7f14fc0d9ee92b43 The thread refers to logging but the approach works for any start up code; I've provided three points where code can be hooked, which I've called "bootstrap" (e.g. to initialize logging), "pre-model" (before app loading, say to install class_prepared listeners) and "post-model" (after app loading, to do any work which needs apps to be initialized and models to be available). I would welcome some feedback ... Launchpad branch is here: https://code.launchpad.net/~vinay-sajip/django/logging An example settings file which uses the functionality in the branch is in the second of the two posts mentioned above. Regards, Vinay Sajip
-- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.