mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-06 05:31:44 +00:00
improved muleloop in uwsgidecoraotors
This commit is contained in:
+13
-2
@@ -1,4 +1,5 @@
|
||||
import uwsgi
|
||||
import sys
|
||||
from threading import Thread
|
||||
|
||||
try:
|
||||
@@ -170,7 +171,12 @@ class mule_brain(object):
|
||||
|
||||
def __call__(self):
|
||||
if uwsgi.mule_id() == self.num:
|
||||
self.f()
|
||||
try:
|
||||
self.f()
|
||||
except:
|
||||
exc = sys.exc_info()
|
||||
sys.excepthook(exc[0], exc[1], exc[2])
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
class mule_brainloop(mule_brain):
|
||||
@@ -178,7 +184,12 @@ class mule_brainloop(mule_brain):
|
||||
def __call__(self):
|
||||
if uwsgi.mule_id() == self.num:
|
||||
while True:
|
||||
self.f()
|
||||
try:
|
||||
self.f()
|
||||
except:
|
||||
exc = sys.exc_info()
|
||||
sys.excepthook(exc[0], exc[1], exc[2])
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
class mule(object):
|
||||
|
||||
Reference in New Issue
Block a user