* [PATCH 2/9] config: always use namespaced "publicinboxlimiter"
2017-01-07 1:44 6% [PATCH 0/9] misc cleanups and trimming Eric Wong
@ 2017-01-07 1:44 7% ` Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2017-01-07 1:44 UTC (permalink / raw)
To: meta
I'm not sure if we'll ever support sharing a config file
with other tools, but maybe we will, and "limiter" is
too generic.
---
lib/PublicInbox/Config.pm | 6 +-----
t/config_limiter.t | 2 +-
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/lib/PublicInbox/Config.pm b/lib/PublicInbox/Config.pm
index 6e31df7..3e3d79a 100644
--- a/lib/PublicInbox/Config.pm
+++ b/lib/PublicInbox/Config.pm
@@ -90,11 +90,7 @@ sub limiter {
my ($self, $name) = @_;
$self->{-limiters}->{$name} ||= do {
require PublicInbox::Qspawn;
- my $max;
- # XXX "limiter.<name>.max" was a historical mistake
- foreach my $pfx (qw(publicinboxlimiter limiter)) {
- $max ||= $self->{"$pfx.$name.max"};
- }
+ my $max = $self->{"publicinboxlimiter.$name.max"};
PublicInbox::Qspawn::Limiter->new($max);
};
}
diff --git a/t/config_limiter.t b/t/config_limiter.t
index 3c7ec55..486bfbe 100644
--- a/t/config_limiter.t
+++ b/t/config_limiter.t
@@ -25,7 +25,7 @@ my $cfgpfx = "publicinbox.test";
{
my $config = PublicInbox::Config->new({
- 'limiter.named.max' => 3,
+ 'publicinboxlimiter.named.max' => 3,
"$cfgpfx.address" => 'test@example.com',
"$cfgpfx.mainrepo" => '/path/to/non/existent',
"$cfgpfx.httpbackendmax" => 'named',
--
EW
^ permalink raw reply related [relevance 7%]
* [PATCH 0/9] misc cleanups and trimming
@ 2017-01-07 1:44 6% Eric Wong
2017-01-07 1:44 7% ` [PATCH 2/9] config: always use namespaced "publicinboxlimiter" Eric Wong
0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2017-01-07 1:44 UTC (permalink / raw)
To: meta
Weak reference dependencies are entirely gone. This should
simplify the internal object structures of Perl a bit and
hopefully make the data structures easier to reason about.
While we're at it, there's several search-related cleanups
to eliminate some dead code.
9 changes:
qspawn: prepare to support runtime reloading of Limiter
config: always use namespaced "publicinboxlimiter"
config: remove unused get() method
inbox: describe the full key name
inbox: eliminate weaken usage entirely
config: allow per-inbox nntpserver
remove incorrect comment about strftime + locales
searchmsg: favor direct hash access over accessor methods
search: remove subject_summary
lib/PublicInbox/Config.pm | 14 ++------
lib/PublicInbox/Inbox.pm | 73 ++++++++++++++++++----------------------
lib/PublicInbox/Qspawn.pm | 11 ++++--
lib/PublicInbox/Search.pm | 29 ++--------------
lib/PublicInbox/SearchIdx.pm | 4 +--
lib/PublicInbox/SearchMsg.pm | 36 +++-----------------
lib/PublicInbox/WwwAtomStream.pm | 1 -
t/config.t | 25 ++++++++++++--
t/config_limiter.t | 11 +++---
t/search.t | 17 ----------
10 files changed, 78 insertions(+), 143 deletions(-)
^ permalink raw reply [relevance 6%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2017-01-07 1:44 6% [PATCH 0/9] misc cleanups and trimming Eric Wong
2017-01-07 1:44 7% ` [PATCH 2/9] config: always use namespaced "publicinboxlimiter" Eric Wong
Code repositories for project(s) associated with this public inbox
https://80x24.org/public-inbox.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).