]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Inbox.pm
inbox: keep Danga::Socket optional
[public-inbox.git] / lib / PublicInbox / Inbox.pm
index 0ea18b4cd986a8add505604a09f8b7533513eab9..73f5761a875b1d1e6b8f6bfa3512248f6db54b5f 100644 (file)
@@ -17,6 +17,7 @@ eval {
        require PublicInbox::EvCleanup;
        $cleanup_timer = undef; # OK if we get here
 };
+my $cleanup_broken = $@;
 
 my $CLEANUP = {}; # string(inbox) -> inbox
 sub cleanup_task () {
@@ -31,6 +32,7 @@ sub cleanup_task () {
 
 sub _cleanup_later ($) {
        my ($self) = @_;
+       return if $cleanup_broken;
        return unless PublicInbox::EvCleanup::enabled();
        $cleanup_timer ||= PublicInbox::EvCleanup::later(*cleanup_task);
        $CLEANUP->{"$self"} = $self;
@@ -273,7 +275,7 @@ sub msg_by_smsg ($$;$) {
        my ($self, $smsg, $ref) = @_;
 
        # ghosts may have undef smsg (from SearchThread.node) or
-       # no {blob} field (from each_smsg_by_mid)
+       # no {blob} field
        return unless defined $smsg;
        defined(my $blob = $smsg->{blob}) or return;
 
@@ -290,11 +292,6 @@ sub smsg_mime {
        }
 }
 
-sub path_check {
-       my ($self, $path) = @_;
-       git($self)->check('HEAD:'.$path);
-}
-
 sub mid2num($$) {
        my ($self, $mid) = @_;
        my $mm = mm($self) or return;