Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions remote_cache/seaweed.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,9 @@ def wait_for(self, url: str, first: Callable[[], None] | None = None) -> None:
raise AssertionError(f"{url} never answered; see {self.log}")

def close(self) -> None:
self.process.terminate()
try:
self.process.wait(timeout=30)
except subprocess.TimeoutExpired:
# A graceful stop flushes its volumes first, which a loaded machine can stretch past
# any patience; nothing in the temporary directory is worth waiting for.
self.process.kill()
self.process.wait()
# weed keeps running for more than a minute after SIGTERM, because its filer retries a
# metadata write that fails once the volume server has stopped. The caller removes the
# directory afterwards, so nothing in it needs a graceful stop.
self.process.kill()
self.process.wait()
self.output.close()
Loading