diff options
author | Eric Wong <e@80x24.org> | 2021-02-22 08:22:58 -0300 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-02-22 18:14:22 -0400 |
commit | 3a40128f8418d3c3bc826a1d45ca907478339190 (patch) | |
tree | 3ce2cf473e46e7289a33b7ff4394e5792263a121 | |
parent | f267821b1bef4488978a95f99fd0f837fdf475b7 (diff) | |
download | public-inbox-3a40128f8418d3c3bc826a1d45ca907478339190.tar.gz |
Since we stopped using LeiAuth as a WQ worker, keeping this around as a single-use sub makes no sense and wastes several KB of memory.
-rw-r--r-- | lib/PublicInbox/LeiConvert.pm | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/lib/PublicInbox/LeiConvert.pm b/lib/PublicInbox/LeiConvert.pm index b45de4e0..4839dea4 100644 --- a/lib/PublicInbox/LeiConvert.pm +++ b/lib/PublicInbox/LeiConvert.pm @@ -62,17 +62,6 @@ sub do_convert { # via wq_do delete $self->{wcb}; # commit } -sub convert_start { - my ($lei) = @_; - my $self = $lei->{cnv}; - my $op = $lei->workers_start($self, 'lei_convert', 1, { - '' => [ $lei->can('dclose'), $lei ] - }); - $self->wq_io_do('do_convert', []); - $self->wq_close(1); - while ($op && $op->{sock}) { $op->event_step } -} - sub call { # the main "lei convert" method my ($cls, $lei, @inputs) = @_; my $opt = $lei->{opt}; @@ -131,7 +120,12 @@ sub call { # the main "lei convert" method $nrd->{quiet} = $opt->{quiet}; $lei->{nrd} = $nrd; } - convert_start($lei); + my $op = $lei->workers_start($self, 'lei_convert', 1, { + '' => [ $lei->can('dclose'), $lei ] + }); + $self->wq_io_do('do_convert', []); + $self->wq_close(1); + while ($op && $op->{sock}) { $op->event_step } } sub ipc_atfork_child { |