unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [PATCH] index: allow indexing before configuration
@ 2016-11-04 21:11 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2016-11-04 21:11 UTC (permalink / raw)
  To: meta; +Cc: Eric Wong

One may build the initial index on a powerful host and transfer
it to a weaker one for incremental indexing.  Thus there is
no requirement to have a configured public-inbox for building
the index unless a user needs altid support or some such.
---
 script/public-inbox-index | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/script/public-inbox-index b/script/public-inbox-index
index 1431b99..e9bbec9 100755
--- a/script/public-inbox-index
+++ b/script/public-inbox-index
@@ -12,7 +12,10 @@ use Getopt::Long qw(:config gnu_getopt no_ignore_case auto_abbrev);
 use Cwd 'abs_path';
 my $usage = "public-inbox-index GIT_DIR";
 use PublicInbox::Config;
-my $config = PublicInbox::Config->new;
+my $config = eval { PublicInbox::Config->new } || eval {
+	warn "public-inbox unconfigured for serving, indexing anyways...\n";
+	{}
+};
 eval { require PublicInbox::SearchIdx };
 if ($@) {
 	print STDERR "Search::Xapian required for $0\n";
-- 
EW


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-11-04 21:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-04 21:11 [PATCH] index: allow indexing before configuration Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).