mirror of
https://github.com/XRPLF/clio.git
synced 2026-06-07 18:56:41 +00:00
feat: Graceful shutdown with old web server (#2786)
- Stop accepting connections during graceful shutdown in the old web server - Stop all the services before Clio exits - Move cache saving into stop callback
This commit is contained in:
@@ -171,6 +171,16 @@ public:
|
||||
virtual void
|
||||
waitUntilCacheContainsSeq(uint32_t seq) = 0;
|
||||
|
||||
/**
|
||||
* @brief Save the cache to file
|
||||
* @note This operation takes about 7 seconds and it keeps a shared lock of mtx_
|
||||
*
|
||||
* @param path The file path to save the cache to
|
||||
* @return An error as a string if any
|
||||
*/
|
||||
[[nodiscard]] virtual std::expected<void, std::string>
|
||||
saveToFile(std::string const& path) const = 0;
|
||||
|
||||
/**
|
||||
* @brief Load the cache from file
|
||||
* @note This operation takes about 7 seconds and it keeps mtx_ exclusively locked
|
||||
|
||||
Reference in New Issue
Block a user