Skip to content
Snippets Groups Projects
Commit 6ff17ee8ce2a authored by Patrice Journoud's avatar Patrice Journoud
Browse files

suppression de l'argument superflu no_tsp

parent f5f980497838
No related branches found
No related tags found
No related merge requests found
###
# app configuration
# http://docs.pylonsproject.org/projects/pyramid/en/1.5-branch/narr/environment.html
###
[app:main]
use = egg:pytsprf
pyramid.reload_templates = true
pyramid.debug_authorization = false
pyramid.debug_notfound = false
pyramid.debug_routematch = false
pyramid.default_locale_name = en
pyramid.includes =
pyramid_debugtoolbar
pyramid_tm
sqlalchemy.url = sqlite:///%(here)s/db.sqlite3
osrm.hostname=osrm.recette.xcg.global
osrm.scheme=http
# By default, the toolbar only appears for clients from IP addresses
# '127.0.0.1' and '::1'.
# debugtoolbar.hosts = 127.0.0.1 ::1
###
# wsgi server configuration
###
[server:main]
use = egg:waitress#main
host = 0.0.0.0
port = 6544
###
# logging configuration
# http://docs.pylonsproject.org/projects/pyramid/en/1.5-branch/narr/logging.html
###
[loggers]
keys = root, pytsprf
[handlers]
keys = console, pytsprf
[formatters]
keys = generic
[logger_root]
level = INFO
handlers =
[logger_pytsprf]
level = DEBUG
handlers = pytsprf
qualname = pytsprf
propagate = 0
[handler_pytsprf]
class = FileHandler
args = ('/home/pjournoud/dev/pytsprf_dev/connections.log','a')
level = INFO
formatter = generic
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic
[formatter_generic]
format = %(asctime)s - %(name)s - %(levelname)s - %(message)s
......@@ -51,6 +51,7 @@
url = "%s://%s/viaroute?" % (self.scheme, self.host,)
# i = 0
i = 0
npoints = len(points)
for pointi in points:
url += "loc=%s,%s" % (pointi[0], pointi[1],)
......@@ -55,8 +56,8 @@
for pointi in points:
url += "loc=%s,%s" % (pointi[0], pointi[1],)
# if (i < len(points) - 1):
# url += "?"
# i+=1
if (i < npoints - 1):
url += "?"
i += 1
url += "?compression=false"
......
......@@ -204,7 +204,6 @@
solver = TSP(points,
get_distance,
no_tsp=True,
start=start,
end=end
)
......@@ -219,7 +218,7 @@
return viaroute.get_viaroute(ordered_points)
def connections_logging(request):
def log_connections(request):
"""
This log allows to trace User connections for further
......@@ -242,7 +241,7 @@
# a log allows to trace User connections for further statistical reports
connections_logging(request)
log_connections(request)
requestDataDict = request.json
points = convert_to_points(requestDataDict)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment