]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/V2Writable.pm
watch: avoid unnecessary spawning on spam removals
[public-inbox.git] / lib / PublicInbox / V2Writable.pm
index c926446c87ef0697057fdf1973228891ce2a8194..553dd839f39a9a56227e8a092d55e791ca54b2e0 100644 (file)
@@ -655,6 +655,9 @@ sub checkpoint ($;$) {
 # public
 sub barrier { checkpoint($_[0], 1) };
 
+# true if locked and active
+sub active { !!$_[0]->{im} }
+
 # public
 sub done {
        my ($self) = @_;
@@ -679,8 +682,8 @@ sub done {
                        $err .= "shard close: $@\n" if $@;
                }
        }
-       eval { $self->{over}->disconnect };
-       $err .= "over disconnect: $@\n" if $@;
+       eval { $self->{over}->dbh_close };
+       $err .= "over close: $@\n" if $@;
        delete $self->{bnote};
        my $nbytes = $self->{total_bytes};
        $self->{total_bytes} = 0;