avoid unnessecary process check
This commit is contained in:
parent
71b967d243
commit
8438024370
@ -69,7 +69,7 @@ class OSRMLoader
|
|||||||
|
|
||||||
def wait_for_shutdown
|
def wait_for_shutdown
|
||||||
while osrm_up?
|
while osrm_up?
|
||||||
sleep 0.1
|
sleep 0.01
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -90,7 +90,7 @@ class OSRMLoader
|
|||||||
end
|
end
|
||||||
|
|
||||||
def osrm_up
|
def osrm_up
|
||||||
return if osrm_up?
|
return if @@pid
|
||||||
@@pid = Process.spawn("#{BIN_PATH}/osrm-routed #{@input_file} --port #{OSRM_PORT}",:out=>OSRM_ROUTED_LOG_FILE, :err=>OSRM_ROUTED_LOG_FILE)
|
@@pid = Process.spawn("#{BIN_PATH}/osrm-routed #{@input_file} --port #{OSRM_PORT}",:out=>OSRM_ROUTED_LOG_FILE, :err=>OSRM_ROUTED_LOG_FILE)
|
||||||
Process.detach(@@pid) # avoid zombie processes
|
Process.detach(@@pid) # avoid zombie processes
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user