Bug fixes
Signed-off-by: fly <merspieler@airmail.cc>
This commit is contained in:
parent
15046bde16
commit
6ff4db3abd
1 changed files with 5 additions and 5 deletions
|
@ -22,7 +22,7 @@ import socket
|
|||
import re
|
||||
from time import sleep, strftime, time
|
||||
|
||||
from common import send_status, get_job, norm, get_south, get_west, get_east, get_north
|
||||
from common import send_status, get_job, norm, get_south, get_west, get_east, get_north, get_area_name
|
||||
|
||||
action = "pending"
|
||||
host = socket.gethostname()
|
||||
|
@ -78,7 +78,7 @@ while i < argc:
|
|||
|
||||
def cleanup():
|
||||
if os.path.isfile("projects/worldbuild-" + name + "/osm2city-exceptions.log"):
|
||||
run("mv projects/worldbuild-" + name + "/osm2city-exceptions.log projects/worldbuild/output/error/" + name + "-" + strftime("%Y%m%d-%H%M", time()) + ".exceptions.log", shell=True)
|
||||
run("mv projects/worldbuild-" + name + "/osm2city-exceptions.log projects/worldbuild/output/error/" + name + "-" + strftime("%Y%m%d-%H%M") + ".exceptions.log", shell=True)
|
||||
|
||||
run("rm -rf projects/worldbuild-" + name, shell=True)
|
||||
|
||||
|
@ -105,7 +105,7 @@ while running:
|
|||
print("ERROR: Invalid tile name")
|
||||
sys.exit(1)
|
||||
else:
|
||||
db_name = prefix + get_area_name(name, major=True)
|
||||
db_name = prefix + get_area_name(get_south(name), get_west(name), major=True)
|
||||
|
||||
if get_west(name) < 0:
|
||||
bounds = "bounds=*"
|
||||
|
@ -121,9 +121,9 @@ while running:
|
|||
if not quiet:
|
||||
print("Building " + name)
|
||||
|
||||
logpath = "projects/worldbuild/output/" + get_area_name(name, major=True) + "/" + get_area_name(name) + "/"
|
||||
logpath = "projects/worldbuild/output/" + get_area_name(get_south(name), get_west(name), major=True) + "/" + get_area_name(get_south(name), get_west(name)) + "/"
|
||||
run("mkdir -p " + logpath, shell=True)
|
||||
with open(logpath + name + "-" + strftime("%Y%m%d-%H%M", time()) + ".log", "w") as log_file:
|
||||
with open(logpath + name + "-" + strftime("%Y%m%d-%H%M") + ".log", "w") as log_file:
|
||||
build = Popen("./build -S 10 -t 1 worldbuild-" + name, stdout=log_file, stderr=STDOUT, shell=True, start_new_session=True)
|
||||
|
||||
build.wait()
|
||||
|
|
Loading…
Reference in a new issue