diff options
author | Eric Wong <e@80x24.org> | 2020-11-15 23:20:17 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2020-11-15 23:32:29 +0000 |
commit | 355c345f8eb8ac3edd5545a2548c90bd8b32d66e (patch) | |
tree | 2e9c24156a5281c5e2c5fd57095e35705f4715f8 /lib/PublicInbox/SearchIdx.pm | |
parent | 5c4874309c4dd7aa8b9acd6bb97bd512360ab08a (diff) | |
download | public-inbox-355c345f8eb8ac3edd5545a2548c90bd8b32d66e.tar.gz |
The initial "git log" invocation for a git epoch can be time consuming, so check for graceful shutdown at each line to ensure timely shutdowns and avoid SSD/HDD wear.
Diffstat (limited to 'lib/PublicInbox/SearchIdx.pm')
-rw-r--r-- | lib/PublicInbox/SearchIdx.pm | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/PublicInbox/SearchIdx.pm b/lib/PublicInbox/SearchIdx.pm index 90d8c8b3..6ff2cf94 100644 --- a/lib/PublicInbox/SearchIdx.pm +++ b/lib/PublicInbox/SearchIdx.pm @@ -753,6 +753,7 @@ sub log2stack ($$$) { $range); my ($at, $ct, $stk, $cmt); while (<$fh>) { + return if $sync->{quit}; if (/\A([0-9]+)-([0-9]+)-($OID)$/o) { ($at, $ct, $cmt) = ($1 + 0, $2 + 0, $3); $stk //= PublicInbox::IdxStack->new($cmt); |