New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Apache docs #195
Comments
I agree that using environment variables to communicate between to perl scripts is hacky and bad. But how would I import contrib.wsgi_autoreload without running the top level code (which stops with a KeyError because KLAUS_SITE_NAME is not set)? Would it suffice to wrap it into the usual |
Ah, good point, I'm not sure if the |
Not sure what you mean by
but anyway, I just tried wrapping the init stuff in wsgi_autoreload (with from klaus.contrib.wsgi_autoreload import make_autoreloading_app
application = make_autoreloading_app(
"/srv/git/",
"klaus on our git server",
ctags_policy="tags-and-branches",
) running it with |
Hm... Flask documentation says
http://flask.pocoo.org/docs/0.12/deploying/mod_wsgi/ Which is an indicator that
Well, simply use |
The correct fix for all of this mess is to separate the core autoreload logic ( klaus/klaus/contrib/wsgi_autoreload.py Lines 12 to 54 in 6f7f167
|
True (it is
This would work, at least if klaus/klaus/contrib/app_args.py Line 11 in 6f7f167
os.environ.get('KLAUS_SITE_NAME', 'poorly configured site') to prevent a KeyError on import (so the import is not done). But instantiating an application and then throwing it away is also ugly.
Yes, that's what I'd do if you think we should not change the existing wsgi_autoreload's behaviour. |
Agreed! |
like this? (untested, maybe on monday) |
Yep! If it works, I'm happy to merge that. |
FWIW: I wonder why this issue is open. From #198 do I understand that code was merged. My wish: Update this issue with why it is open. (even better: close it ) |
Thank for the reminder! |
@jahir
While what you wrote here works: https://github.com/jonashaag/klaus/wiki/Apache---mod_wsgi-deployment/_compare/a759371%5E...a759371
It doesn't actually make a lot of sense to put these values into environment variables in the first place. We could simply directly call
make_autoreloading_app
with the config values.The text was updated successfully, but these errors were encountered: