Default PERL_ANYEVENT_MAX_OUTSTANDING_DNS to the same as the AnyEvent library default if setting('dns')->{max_outstanding} not defined
This commit is contained in:
@@ -26,6 +26,10 @@ use Role::Tiny::With;
|
||||
use MCE::Signal '-setpgrp';
|
||||
use MCE;
|
||||
|
||||
# set max outstanding requests for AnyEvent::DNS
|
||||
local $ENV{'PERL_ANYEVENT_MAX_OUTSTANDING_DNS'}
|
||||
= setting('dns')->{max_outstanding} || 10;
|
||||
|
||||
# set temporary MCE files' location in home directory
|
||||
my $home = ($ENV{NETDISCO_HOME} || $ENV{HOME});
|
||||
my $tmp_dir = ($ENV{NETDISCO_TEMP} || dir($home, 'tmp'));
|
||||
|
||||
@@ -53,6 +53,10 @@ $CONFIG->{log} = ($debug ? 'debug' : 'info');
|
||||
# reconfigure logging to force console output
|
||||
Dancer::Logger->init('console', $CONFIG);
|
||||
|
||||
# set max outstanding requests for AnyEvent::DNS
|
||||
local $ENV{'PERL_ANYEVENT_MAX_OUTSTANDING_DNS'}
|
||||
= setting('dns')->{max_outstanding} || 10;
|
||||
|
||||
# for the in-memory local job queue
|
||||
schema('daemon')->deploy;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user