Malcolm,
Given new information, I stand corrected. Given what I had seen in experimenting and certain bits of Django, I was under the impression that all models were deterministically loaded when Django started up. Since that is not the case, it's very clear why this signal would have implications if people started relying on it. I will simply have to find a different means of handling what I'm looking for. I'm going to close that ticket and detail why it isn't a good idea to the best of my ability. Thanks. Daniel On Fri, Apr 10, 2009 at 6:48 PM, Malcolm Tredinnick <[email protected]> wrote: > > On Fri, 2009-04-10 at 12:51 -0700, [email protected] wrote: >> I'd like to get get discussion started on the introduction of a "all >> models loaded and ready for use" signal within AppCache. There's a >> ticket already out there for this (http://code.djangoproject.com/ >> ticket/7538) but it looks like that forward progress on it stopped >> because nothing was brought up here. >> >> The only alternative I've found it try to listen for the >> "class_prepared" signal and repeated check to see if the AppCache is >> loaded. This is very sub-optimal and doesn't work under certain >> conditions. >> >> This would be extremely useful to me. > > Why? What is the use-case? > > Part of the reason why this isn't a slam dunk is because it's not really > deterministic when the models will all be loaded and having people > attempt to rely on that (and requiring us to never significantly change > the behaviour) is going to lead to disappointment and tears. > > What are the big problems that require knowing this information, as > opposed to testing AppCache.app_cache_ready() when you're executing code > that might care about this? I'm concerned you want to kick off something > when it happens and I can't imagine what that would be that can't be > done in some other way. I also can't see that it's going be a reliable > approach to a solution, particularly going forward. Locking ourselves > into deep internal implementation behaviour such as the AppCache's > current running approach doesn't strike me as robust engineering. > > Regards, > Malcolm > > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---
