]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Inbox.pm
www: manifest.js.gz generation no longer hogs event loop
[public-inbox.git] / lib / PublicInbox / Inbox.pm
index 55e546e104f538109b95f804efb53e5a556c95ad..b0894a7d6414d038d820afa4533a2c2f69321ddd 100644 (file)
@@ -70,7 +70,7 @@ sub _cleanup_later ($) {
        my ($self) = @_;
        $cleanup_avail = cleanup_possible() if $cleanup_avail < 0;
        return if $cleanup_avail != 1;
-       $cleanup_timer ||= PublicInbox::DS::later(*cleanup_task);
+       $cleanup_timer //= PublicInbox::DS::later(\&cleanup_task);
        $CLEANUP->{"$self"} = $self;
 }
 
@@ -206,14 +206,13 @@ EOF
        };
 }
 
-sub over ($) {
-       my ($self) = @_;
-       my $srch = search($self, 1) or return;
-       $self->{over} //= eval {
-               my $over = $srch->{over_ro};
-               $over->connect; # may fail
+sub over {
+       $_[0]->{over} //= eval {
+               my $srch = search($_[0], 1) or return;
+               my $over = PublicInbox::Over->new("$srch->{xpfx}/over.sqlite3");
+               $over->dbh; # may fail
                $over;
-       }
+       };
 }
 
 sub try_cat {