Not a lot done seem to be stuck2008-06-01 23:04:12Well it has been a cruddy day. I have been trying to figure out a problem with the fcgi implementation. Seem to have been running circles around myself here.
There is a bug in the Django source specifically in django/core/servers/fastcgi.py that was ignores the output settings unless the process is being daemonized. So I added the else clause below has fixed it so I am now getting stdout and stderr messages.
if daemonize:
from django.utils.daemonize import become_daemon
become_daemon(our_home_dir=options["workdir"], **daemon_kwargs)
else:
if options['outlog']:
so = open(options['outlog'], 'a+', 0)
os.dup2(so.fileno(), sys.stdout.fileno())
if options['errlog']:
se = open(err_log, 'a+', 0)
os.dup2(se.fileno(), sys.stderr.fileno())
Except that that breaks the fcgi interactions. With that change I am not able to get responses through the auto-generated named pipes. It seems I have to hand it the bind name for the pipe. But if I do that and daemonize it then lightttpd looses control and if I stop the services the python processes persist. On the other hand I am getting a lot of code crawling experience on the python classes. Which leads me to another observation. Why are so many open source developers so lazy about documentation. If you are going to publish something you dang well had better provide solid design docs, API references and user docs. But, no fcgi is not well documented, lighttpd is not well documented, django is not well documented and Sphene Community Tools are not well documented. Which means I have to spend hours of code crawling to figure anything out. And it isn't just open source developers I have the same problems at work too. Major enterprise systems with cruddy docs and lots of black magic development lead to a nightmare of work. I have heard some people laugh at this and say "well that is called job security." It isn't job security it is crappy development and laziness. My customers have plenty of additional work they want me to do. I am sure they could give me a list 60 years long. <SIGH> well back to code crawling. Posted by Leeland 0 Comments |
|
| Comments: |
|---|
Page: 1
Please login to post a reply.

