diff options
author | Eric Wong <e@80x24.org> | 2018-05-02 20:54:35 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2018-05-02 20:54:35 +0000 |
commit | b23d50b9c2772ec655aa7d60871062415502c8e5 (patch) | |
tree | b7179c3c72685a63cee66a86ef1865edfed8ea68 /scripts | |
parent | 9d5059d2904e7858460dc71a1f55c27d79583385 (diff) | |
download | public-inbox-b23d50b9c2772ec655aa7d60871062415502c8e5.tar.gz |
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/import_slrnspool | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/import_slrnspool b/scripts/import_slrnspool index 7b6c9ab0..ab79e798 100755 --- a/scripts/import_slrnspool +++ b/scripts/import_slrnspool @@ -25,7 +25,15 @@ defined $recipient or die usage(); my $config = PublicInbox::Config->new; my $ibx = $config->lookup($recipient); my $git = $ibx->git; -my $im = PublicInbox::Import->new($git, $ibx->{name}, $ibx->{-primary_address}); +my $im; +if (($ibx->{version} || 1) == 2) { + require PublicInbox::V2Writable; + $im = PublicInbox::V2Writable->new($ibx); + $im->{parallel} = 0; # pointless to be parallel for a single message +} else { + $im = PublicInbox::Import->new($git, $ibx->{name}, + $ibx->{-primary_address}); +} sub key { "publicinbox.$ibx->{name}.importslrnspoolstate"; |