Bir kabuk komutunu çalıştırmaya ve python sinyali modülünü kullanarak onu öldürmeye çalışıyorum.ValueError: sinyal yalnızca ana iş parçacığında çalışır - Django - mod_wsgi
Ben sinyaller ana iş parçacığı ile çalışır biliyorum, bu yüzden birlikte Django geliştirme sunucusu çalıştırmak,
python manage.py runserver --nothreading --noreload
ve iyi çalışıyor.
Ama Apache/mod_wsgi ile Django uygulama dağıtırken, aşağıdaki hata gösterir: Ben de dışarıda aşağıda ayarlara sahip
WSGIDaemonProcess testcloud display-name=scilab_cloud user=apache group=apache threads=1
WSGIProcessGroup testcloud
WSGIScriptAlias//Site/cloud/soc/soc/wsgi.py
WSGIImportScript /Site/cloud/soc/soc/wsgi.py process-group=testcloud application-group=%{GLOBAL}
: Burada
[Fri Sep 12 20:07:00 2014] [error] response = function.call(request, **data)
[Fri Sep 12 20:07:00 2014] [error] File "/Site/cloud/lib/python2.6/site-packages/dajaxice/core/Dajaxice.py", line 18, in call
[Fri Sep 12 20:07:00 2014] [error] return self.function(*args, **kwargs)
[Fri Sep 12 20:07:00 2014] [error] File "/Site/cloud/soc/website/ajax.py", line 83, in execute
[Fri Sep 12 20:07:00 2014] [error] data = scilab_run(code, token, book_id, dependency_exists)
[Fri Sep 12 20:07:00 2014] [error] File "/Site/cloud/soc/website/helpers.py", line 58, in scilab_run
[Fri Sep 12 20:07:00 2014] [error] output = task.run().communicate()[0]
[Fri Sep 12 20:07:00 2014] [error] File "/Site/cloud/soc/website/timeout.py", line 121, in run
[Fri Sep 12 20:07:00 2014] [error] lambda sig,frame : os.killpg(self.pgid,self.timeoutSignal))
[Fri Sep 12 20:07:00 2014] [error] ValueError: signal only works in main thread
benim apache sanal ana ayardır httpd.conf içinde virtualhost: pro için
WSGIRestrictSignal Off
WSGISocketPrefix /var/run/wsgi
Here is the link sinyalini kullanan ve django uygulamamda kullandığım gram.
Herhangi bir yardım için teşekkür ederiz.