We don't want to be triggering OOM or swapping on weaker
systems when we have dozens of inboxes as potential targets.
my $addr = $inbox->{-primary_address};
PublicInbox::Import->new($git, $name, $addr, $inbox);
};
my $addr = $inbox->{-primary_address};
PublicInbox::Import->new($git, $name, $addr, $inbox);
};
- $self->{importers}->{"$im"} = $im;
+
+ my $importers = $self->{importers};
+ if (scalar(keys(%$importers)) > 2) {
+ delete $importers->{"$im"};
+ _done_for_now($self);
+ }
+
+ $importers->{"$im"} = $im;