]> 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 5feb2154f562fda7ce69271d11f3f40e9ba44b88..a3cdcbc08f6c7f6626b40a2cebbbb73b6be14e0d 100644 (file)
@@ -50,9 +50,9 @@ sub cleanup_task () {
 }
 
 sub cleanup_possible () {
-       # no need to require EvCleanup, here, if it were enabled another
+       # no need to require DS, here, if it were enabled another
        # module would've require'd it, already
-       eval { PublicInbox::EvCleanup::enabled() } or return 0;
+       eval { $PublicInbox::DS::in_loop } or return 0;
 
        eval {
                require Devel::Peek; # needs separate package in Fedora
@@ -65,7 +65,7 @@ sub _cleanup_later ($) {
        my ($self) = @_;
        $cleanup_avail = cleanup_possible() if $cleanup_avail < 0;
        return if $cleanup_avail != 1;
-       $cleanup_timer ||= PublicInbox::EvCleanup::later(*cleanup_task);
+       $cleanup_timer ||= PublicInbox::DS::later(*cleanup_task);
        $CLEANUP->{"$self"} = $self;
 }
 
@@ -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//!;