diff options
author | Eric Wong <e@80x24.org> | 2020-09-09 06:26:13 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2020-09-10 19:45:18 +0000 |
commit | 8fdea96141a65ac85d22d21ed9e3f999259ee73c (patch) | |
tree | add5a5934733e2520fd04b152bde30cb223cb5dd /lib/PublicInbox/IMAPD.pm | |
parent | 352e2799ecec328f71aa33219214a0e3fc3d5f10 (diff) | |
download | public-inbox-8fdea96141a65ac85d22d21ed9e3f999259ee73c.tar.gz |
We will need to allow simultaneous iterators on the same config object, since we'll need this for ExtMsg, NNTPD, WwwListing, NewsWWW, and other places.
Diffstat (limited to 'lib/PublicInbox/IMAPD.pm')
-rw-r--r-- | lib/PublicInbox/IMAPD.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/PublicInbox/IMAPD.pm b/lib/PublicInbox/IMAPD.pm index 09bedf5c..3c211ee1 100644 --- a/lib/PublicInbox/IMAPD.pm +++ b/lib/PublicInbox/IMAPD.pm @@ -6,6 +6,7 @@ package PublicInbox::IMAPD; use strict; use PublicInbox::Config; +use PublicInbox::ConfigIter; use PublicInbox::InboxIdle; use PublicInbox::IMAP; use PublicInbox::DummyInbox; @@ -98,8 +99,9 @@ sub refresh_groups { my $pi_config = PublicInbox::Config->new; if ($sig) { # SIGHUP is handled through the event loop $self->{imapd_next} = { dummies => {}, mailboxes => {} }; - $pi_config->iterate_start(\&imapd_refresh_step, $self); - PublicInbox::DS::requeue($pi_config); # call event_step + my $iter = PublicInbox::ConfigIter->new($pi_config, + \&imapd_refresh_step, $self); + $iter->event_step; } else { # initial start is synchronous $self->{dummies} = {}; $pi_config->each_inbox(\&imapd_refresh_ibx, $self); |