UM-Bridge / umbridge

UM-Bridge (the UQ and Model Bridge) provides a unified interface for numerical models that is accessible from virtually any programming language or framework.
https://um-bridge-benchmarks.readthedocs.io/en/docs/
MIT License
33 stars 14 forks source link

Automatically clears url txt files and stops existing HQ server before starting new HQ server #45

Closed chun9l closed 10 months ago

chun9l commented 10 months ago

This PR addresses Issues #38 and #41.

The new function, clear_url, in LoadBalancer.cpp uses regex to filter txt files with names like "url-NUMBERS.txt" and deletes them. It also uses the C++ filesystem library which should be robust against different systems.

Stopping the HQ server is simply done by calling hq server stop in LoadBalacer.cpp. However, other existing HQ servers will also be killed unless --server-dir is specified.

linusseelinger commented 10 months ago

That looks good, thanks a lot! Wasn't aware of std::regex_match, that's nice! :)