diff options
author | Eric Wong <e@80x24.org> | 2016-09-02 21:00:50 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-09-02 21:00:50 +0000 |
commit | 932a70dfd2ea3e8ae7eca5fac680c2ad0a17c46d (patch) | |
tree | 8b342ba08811c9d87c5cef3f8406c93cf5273436 /lib/PublicInbox/Config.pm | |
parent | 790d4f6306d3716e311ce3c141a7666e4f0cd74d (diff) | |
download | public-inbox-932a70dfd2ea3e8ae7eca5fac680c2ad0a17c46d.tar.gz |
Just having "limiter" in the prefix may confuse it with something else. Use the full prefix to avoid this confusion.
Diffstat (limited to 'lib/PublicInbox/Config.pm')
-rw-r--r-- | lib/PublicInbox/Config.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/PublicInbox/Config.pm b/lib/PublicInbox/Config.pm index 5adcd0cc..8d66cf8c 100644 --- a/lib/PublicInbox/Config.pm +++ b/lib/PublicInbox/Config.pm @@ -90,8 +90,12 @@ sub limiter { my ($self, $name) = @_; $self->{-limiters}->{$name} ||= do { require PublicInbox::Qspawn; - my $key = "limiter.$name.max"; - PublicInbox::Qspawn::Limiter->new($self->{$key}); + my $max; + # XXX "limiter.<name>.max" was a historical mistake + foreach my $pfx (qw(publicinboxlimiter limiter)) { + $max ||= $self->{"$pfx.$name.max"}; + } + PublicInbox::Qspawn::Limiter->new($max); }; } |