disqus / gargoyle

Feature switches in Django
http://engineering.disqus.com
Apache License 2.0
746 stars 112 forks source link

Condition Sets not always being registered #19

Closed jjchoy closed 12 years ago

jjchoy commented 13 years ago

I'm using gargoyle with nexus. It works perfectly on my development machine. On my production environment (mod-wsgi daemon mode) the condition sets only seem to be getting registered in some of the processes (at least that is what I think is happening - if I open the gargoyle admin page for a switch and keep reloading the page the conditions only show up sometimes).

I have them both in my INSTALLED APPS

INSTALLED_APPS = (
    ...,
    'nexus',
    'gargoyle',
    ...,
)

and in my urls.py:

import nexus
nexus.autodiscover()

Any ideas on what the problem could be?

dcramer commented 13 years ago

I've looked into this and don't have an answer yet. We're doing the same approach as django.contrib.admin and many other things so it's a bit confusing. Making _registry a class level variable definitely solves it, but then we have issues with isolation.

jjchoy commented 13 years ago

Thanks dcramer. Let me know if there is anything I can do to help out

jjchoy commented 13 years ago

oops, didn't mean to close it

jjchoy commented 12 years ago

Thanks!