mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-26 11:08:13 +00:00
Added mypy ignore fix for logging.py (library change), as well as quick mac fix on mem.cached
This commit is contained in:
@@ -342,7 +342,8 @@ HTML_HEADER: str = """<!DOCTYPE html>
|
|||||||
<title>Nominatim - Debug</title>
|
<title>Nominatim - Debug</title>
|
||||||
<style>
|
<style>
|
||||||
""" + \
|
""" + \
|
||||||
(HtmlFormatter(nobackground=True).get_style_defs('.highlight') if CODE_HIGHLIGHT else '') + \
|
(HtmlFormatter(nobackground=True).get_style_defs('.highlight') # type: ignore[no-untyped-call]
|
||||||
|
if CODE_HIGHLIGHT else '') + \
|
||||||
"""
|
"""
|
||||||
h2 { font-size: x-large }
|
h2 { font-size: x-large }
|
||||||
|
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ def import_osm_data(osm_files: Union[Path, Sequence[Path]],
|
|||||||
fsize += os.stat(str(fname)).st_size
|
fsize += os.stat(str(fname)).st_size
|
||||||
else:
|
else:
|
||||||
fsize = os.stat(str(osm_files)).st_size
|
fsize = os.stat(str(osm_files)).st_size
|
||||||
options['osm2pgsql_cache'] = int(min((mem.available + mem.cached) * 0.75,
|
options['osm2pgsql_cache'] = int(min((mem.available + getattr(mem, 'cached', 0)) * 0.75,
|
||||||
fsize * 2) / 1024 / 1024) + 1
|
fsize * 2) / 1024 / 1024) + 1
|
||||||
|
|
||||||
run_osm2pgsql(options)
|
run_osm2pgsql(options)
|
||||||
|
|||||||
Reference in New Issue
Block a user