chairemobilite / transition

Transition is a modern new approach to transit planning. It's a web application to model, simulate and plan public transit and alternative transportation.

Home Page:http://transition.city

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

public api: trRouting process can be started many times

tahini opened this issue · comments

If many requests to routing or accessibility map happen before the trRouting process is started, each request will attempt to start the trRouting process, which can take a few seconds.

As a proof, here's the console.log I got. Oddly, the process that is supposed to have exited/closed has the same PID as the one actually running.

The process of starting a process should be a singleton and the second request should not attempt to start it again but just wait for the same operation as the first one.

Starting trRouting service trRouting4000 with current pid null
Starting trRouting service trRouting4000 with current pid null
/home/gbastien/Mobilité/sources/transition/examples/runtime_od_mtl_2023/pids/trRouting4000.pid
trRouting server (trRouting4000) started pid:1395897
trRouting server (trRouting4000)-(1395987) exited with code null and signal SIGABRT
trRouting server (trRouting4000)-(1395987) closed with code null and signal SIGABRT
::ffff:127.0.0.1 - - [18/Jul/2024:13:40:59 +0000] "POST /api/v1/accessibility?withGeojson=true HTTP/1.1" 200 530659 "-" "python-requests/2.25.1"
::ffff:127.0.0.1 - - [18/Jul/2024:13:41:00 +0000] "POST /api/v1/accessibility?withGeojson=true HTTP/1.1" 200 478453 "-" "python-requests/2.25.1"
FILE EXIST pids/trRouting4000.pid:1395897
PID 1395897, Process IS_RUNNING true