]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Inbox.pm
config: support multi-value inbox.*.*url
[public-inbox.git] / lib / PublicInbox / Inbox.pm
index 43c6a4285e29b71bdec75bb8a452c2567f28275a..a3cdcbc08f6c7f6626b40a2cebbbb73b6be14e0d 100644 (file)
@@ -52,7 +52,7 @@ sub cleanup_task () {
 sub cleanup_possible () {
        # no need to require DS, here, if it were enabled another
        # module would've require'd it, already
-       eval { PublicInbox::DS::running() } or return 0;
+       eval { $PublicInbox::DS::in_loop } or return 0;
 
        eval {
                require Devel::Peek; # needs separate package in Fedora
@@ -252,7 +252,7 @@ sub base_url {
        } else {
                # either called from a non-PSGI environment (e.g. NNTP/POP3)
                $self->{-base_url} ||= do {
-                       my $url = $self->{url} or return undef;
+                       my $url = $self->{url}->[0] or return undef;
                        # expand protocol-relative URLs to HTTPS if we're
                        # not inside a web server
                        $url = "https:$url" if $url =~ m!\A//!;