Nantes Université

Skip to content
Extraits de code Groupes Projets
Valider 1fb5bab0 rédigé par Emmanuel DESMONTILS's avatar Emmanuel DESMONTILS
Parcourir les fichiers

f

parent f95c4f59
Branches adaptation-gunicorn
Aucune étiquette associée trouvée
1 requête de fusion!18Adaptation gunicorn
Aucun aperçu pour ce type de fichier
# gunicorn -b '' --reload -p gu.pid -D --access-logfile log.log --error-logfile err.log -n celcat-ext -R # gunicorn -b '' --reload -p gu.pid -D --access-logfile log.log --error-logfile err.log -n celcat-ext -R unantes-edt-synthesis:app
bind='0.0.0.0:32769' bind='0.0.0.0:32769'
......
...@@ -64,7 +64,7 @@ class Context(object): ...@@ -64,7 +64,7 @@ class Context(object):
def __init__(self): def __init__(self):
super(Context, self).__init__() super(Context, self).__init__()
self.host = '0.0.0.0' self.host = '0.0.0.0'
self.port = 5002 self.port = 80
self.tree = None self.tree = None
self.debug = False self.debug = False
self.version = '1.0' self.version = '1.0'
...@@ -80,19 +80,23 @@ class Context(object): ...@@ -80,19 +80,23 @@ class Context(object):
pass pass
def loadWebConfig(self, configFile) : def loadWebConfig(self, configFile) :
XMLparser = etree.XMLParser(recover=True, strip_cdata=True) if existFile(configFile) :
self.tree = etree.parse(configFile, XMLparser) XMLparser = etree.XMLParser(recover=True, strip_cdata=True)
#--- self.tree = etree.parse(configFile, XMLparser)
dtd = etree.DTD('web-config.dtd') if existFile('web-config.dtd') :
assert dtd.validate(self.tree), '%s non valide au chargement : %s' % ( #---
configFile, dtd.error_log.filter_from_errors()[0]) dtd = etree.DTD('web-config.dtd')
#--- assert dtd.validate(self.tree), '%s non valide au chargement : %s' % (
self.version = self.tree.getroot().get('version') configFile, dtd.error_log.filter_from_errors()[0])
self.name = self.tree.getroot().get('name') #---
if self.tree.getroot().get('debug') == 'false': self.version = self.tree.getroot().get('version')
self.debug = False self.name = self.tree.getroot().get('name')
if self.tree.getroot().get('debug') == 'false':
self.debug = False
else:
self.debug = True
else: else:
self.debug = True pass
ctx = Context() ctx = Context()
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter