Pokus o lepsi detekci Django WSGI chyby
This commit is contained in:
		
							parent
							
								
									bd62cd2826
								
							
						
					
					
						commit
						eda0b2ac87
					
				
					 1 changed files with 11 additions and 1 deletions
				
			
		|  | @ -14,4 +14,14 @@ sys.path.append(os.path.join(os.path.dirname(__file__), '..')) | |||
| sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'lib', 'python2.7', 'site-packages')) | ||||
| 
 | ||||
| from django.core.wsgi import get_wsgi_application | ||||
| 
 | ||||
| try: | ||||
|     application = get_wsgi_application() | ||||
| except Exception: | ||||
|     print 'handling WSGI exception' | ||||
|     # Error loading applications | ||||
|     if 'mod_wsgi' in sys.modules: | ||||
|         traceback.print_exc() | ||||
|         os.kill(os.getpid(), signal.SIGINT) | ||||
|         time.sleep(10) | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Tomas Gavenciak
						Tomas Gavenciak