Poser le processus du job avant son fil de veille (double lancement possible)
This commit is contained in:
@ -1299,6 +1299,10 @@ def _launch_job(tiles, viz, req, qid=None):
|
||||
cwd="/app" if Path("/app").exists() else None,
|
||||
env=dict(os.environ, LIDAR_RUN_ID=run_id),
|
||||
start_new_session=True)
|
||||
# proc posé AVANT le fil de veille : un run qui meurt instantanément
|
||||
# déclencherait _watch → _start_next_queued avec _job["proc"] encore à
|
||||
# None (serveur « libre ») et un second run partirait en parallèle.
|
||||
_job["proc"] = p
|
||||
|
||||
def _watch():
|
||||
rc = p.wait()
|
||||
@ -1311,7 +1315,6 @@ def _launch_job(tiles, viz, req, qid=None):
|
||||
_start_next_queued()
|
||||
|
||||
threading.Thread(target=_watch, daemon=True).start()
|
||||
_job["proc"] = p
|
||||
return cmd
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user