mirror of
https://github.com/enzet/map-machine.git
synced 2025-08-06 10:09:52 +02:00
Merge 90bb5b0897
into 825eb34191
This commit is contained in:
commit
4210a549fa
2 changed files with 7 additions and 0 deletions
|
@ -74,6 +74,7 @@ def run_server(options: argparse.Namespace) -> None:
|
||||||
try:
|
try:
|
||||||
handler = TileServerHandler
|
handler = TileServerHandler
|
||||||
handler.cache = Path(options.cache)
|
handler.cache = Path(options.cache)
|
||||||
|
handler.update_cache = options.update_cache
|
||||||
handler.options = options
|
handler.options = options
|
||||||
server = HTTPServer(("", options.port), handler)
|
server = HTTPServer(("", options.port), handler)
|
||||||
logging.info(f"Server started on port {options.port}.")
|
logging.info(f"Server started on port {options.port}.")
|
||||||
|
|
|
@ -270,6 +270,12 @@ def add_server_arguments(parser: argparse.ArgumentParser) -> None:
|
||||||
default="cache",
|
default="cache",
|
||||||
metavar="<path>",
|
metavar="<path>",
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--update-cache",
|
||||||
|
action=argparse.BooleanOptionalAction,
|
||||||
|
default=True,
|
||||||
|
help="allow writing to cache",
|
||||||
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--port",
|
"--port",
|
||||||
help="port number",
|
help="port number",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue