Skip to content
Snippets Groups Projects
Commit ad19ad71 authored by Nils-Arne Dreier's avatar Nils-Arne Dreier
Browse files

fix: rename loco endpoint timestep -> current_timestep

parent f56f7f88
No related branches found
No related tags found
1 merge request!18feat(loco): add http endpoint for requesting the current timestep index
Pipeline #90634 passed
......@@ -9,7 +9,7 @@ class LocoServer:
self.timestep = None
self.port = port
def _serve_timestep(request):
def _serve_current_timestep(request):
return web.Response(body=str(self.timestep))
def _serve(request):
......@@ -29,7 +29,7 @@ class LocoServer:
loop.run_forever()
app = web.Application()
app.add_routes([web.get("/timestep", _serve_timestep)])
app.add_routes([web.get("/current_timestep", _serve_current_timestep)])
app.add_routes([web.get("/{key:.*}", _serve)])
runner = web.AppRunner(app)
t = Thread(target=_run_server, args=(runner, host, port), daemon=True)
......@@ -68,7 +68,7 @@ class LocoServer:
# use last rank for timestep assumption: this rank has
# the healpix order 0 grid where the information
# arrives last
f.write(f' "/timestep" loco_backend{r};\n')
f.write(f' "/current_timestep" loco_backend{r};\n')
f.write("}\n\n")
for i in range(len(distributed_data_vars)):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment