Improvements to mbox importer

* store time it took to index message in DB (to find performance issues)
* ignore listserv specific files
* better examples for split_regex
* first email in mbox shouldn't contain the split string
* always lock the DB in exclusive mode
* save email within transaction
* messages can be grouped by subject and use original order (for Listserv)
* adds option to index emails without running the import
This commit is contained in:
Gerhard Schlager
2018-01-17 12:03:57 +01:00
parent 5d7a33cd6d
commit bb54eb1192
7 changed files with 134 additions and 49 deletions

View File

@ -13,6 +13,8 @@ module ImportScripts::Mbox
attr_reader :trust_level
attr_reader :prefer_html
attr_reader :staged
attr_reader :index_only
attr_reader :group_messages_by_subject
def initialize(yaml)
@data_dir = yaml['data_dir']
@ -21,6 +23,8 @@ module ImportScripts::Mbox
@trust_level = yaml['default_trust_level']
@prefer_html = yaml['prefer_html']
@staged = yaml['staged']
@index_only = yaml['index_only']
@group_messages_by_subject = yaml['group_messages_by_subject']
end
end
end