diff options
author | Eric Wong <e@80x24.org> | 2021-01-03 02:06:14 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-01-03 18:30:31 +0000 |
commit | 323d8bac125e89a76c904a54a7ae0b2e36f05cc6 (patch) | |
tree | 0220aee8cc0b691fe8ca0a54abd2a528288f3e06 /lib/PublicInbox/SearchIdxShard.pm | |
parent | 82b805db3ad908f1c3ea114f329835c6f881144a (diff) | |
download | public-inbox-323d8bac125e89a76c904a54a7ae0b2e36f05cc6.tar.gz |
Since Storable and Sereal are designed for lossless serialization, we'll just pass $eml objects to whatever process is running SearchIdx.
Diffstat (limited to 'lib/PublicInbox/SearchIdxShard.pm')
-rw-r--r-- | lib/PublicInbox/SearchIdxShard.pm | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/PublicInbox/SearchIdxShard.pm b/lib/PublicInbox/SearchIdxShard.pm index 43dad959..83cbbb25 100644 --- a/lib/PublicInbox/SearchIdxShard.pm +++ b/lib/PublicInbox/SearchIdxShard.pm @@ -43,13 +43,8 @@ sub ipc_atfork_child { # called automatically before ipc_worker_loop PublicInbox::OnDestroy->new($$, \&_worker_done, $self); } -sub index_raw { - my ($self, $msgref, $eml, $smsg, $eidx_key) = @_; - if ($eml) { - undef($$msgref) if $msgref; - } else { # --xapian-only + --sequential-shard: - $eml = PublicInbox::Eml->new($msgref); - } +sub index_eml { + my ($self, $eml, $smsg, $eidx_key) = @_; $smsg->{eidx_key} = $eidx_key if defined $eidx_key; $self->ipc_do('add_message', $eml, $smsg); } |