From 54b250c611c752538666f2bf6d361d3762a21781 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 27 Dec 2020 11:01:42 +0000 Subject: miscsearch: take reopen from Search and use it As with ExtSearch, MiscSearch lacks a janky cleanup timer of PublicInbox::Inbox objects, leading to info about inboxes/newsgroups going stale. Fortunately, we don't use MiscSearch very heavily, yet. In the future, we may be able to detect new inboxes without having to SIGHUP or restart daemons using MiscSearch. --- lib/PublicInbox/WwwListing.pm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/PublicInbox/WwwListing.pm') diff --git a/lib/PublicInbox/WwwListing.pm b/lib/PublicInbox/WwwListing.pm index fce0e530..4b3f1674 100644 --- a/lib/PublicInbox/WwwListing.pm +++ b/lib/PublicInbox/WwwListing.pm @@ -69,6 +69,9 @@ sub hide_key { 'www' } sub response { my ($class, $ctx) = @_; bless $ctx, $class; + if (my $ALL = $ctx->{www}->{pi_cfg}->ALL) { + $ALL->misc->reopen; + } my $re = $ctx->url_regexp or return $ctx->psgi_triple; my $iter = PublicInbox::ConfigIter->new($ctx->{www}->{pi_cfg}, \&list_match_i, $re, $ctx); -- cgit v1.2.3-24-ge0c7