$CLEANUP = {};
}
-sub _cleanup_later ($) {
- my ($self) = @_;
- $cleanup_timer ||= PublicInbox::EvCleanup::later(*cleanup_task);
- $CLEANUP->{"$self"} = $self;
-}
-
sub _set_uint ($$$) {
my ($opts, $field, $default) = @_;
my $val = $opts->{$field};
$self->{git} ||= eval {
my $g = PublicInbox::Git->new($self->{mainrepo});
$g->{-httpbackend_limiter} = $self->{-httpbackend_limiter};
+ $cleanup_timer ||= PublicInbox::EvCleanup::later(*cleanup_task);
+ $CLEANUP->{"$self"} = $self;
$g;
};
}
# backwards compat to fallback to msg_by_mid
# TODO: remove if we bump SCHEMA_VERSION in Search.pm:
- defined(my $blob = $smsg->blob) or return msg_by_mid($self, $smsg->mid);
+ defined(my $blob = $smsg->{blob}) or
+ return msg_by_mid($self, $smsg->mid);
my $str = git($self)->cat_file($blob, $ref);
$$str =~ s/\A[\r\n]*From [^\r\n]*\r?\n//s if $str;