From 7a097dce831a9ad3a99e50013138e57a0def514e Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 23 May 2019 09:36:53 +0000 Subject: xcpdb: implement progress reporting Copying an entire Xapian DB is horribly slow whether it's done via Perl or copydatabase(1). So displaying some progress indication is good for user experience. While we're at it, prefix xapian-compact output, too; since parallel processes end up clobbering each other. --- script/public-inbox-xcpdb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'script') diff --git a/script/public-inbox-xcpdb b/script/public-inbox-xcpdb index 78d37da2..5b66337b 100755 --- a/script/public-inbox-xcpdb +++ b/script/public-inbox-xcpdb @@ -9,12 +9,9 @@ use PublicInbox::Admin; PublicInbox::Admin::require_or_die('-search'); my $usage = "Usage: public-inbox-xcpdb INBOX_DIR\n"; my $opt = {}; -GetOptions($opt, qw(compact)) or die "bad command-line args\n$usage"; +GetOptions($opt, qw(compact quiet|q)) or die "bad command-line args\n$usage"; my @ibxs = PublicInbox::Admin::resolve_inboxes(\@ARGV) or die $usage; - my $cmd = [ \&PublicInbox::Xapcmd::cpdb ]; -open my $null, '>', '/dev/null' or die "failed to open /dev/null: $!\n"; -$opt->{1} = fileno($null); foreach (@ibxs) { my $ibx = PublicInbox::InboxWritable->new($_); # we rely on --no-renumber to keep docids synched to NNTP -- cgit v1.2.3-24-ge0c7