mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-28 18:24:38 -05:00
lazy loading for parsers
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
from .parsers import TextDocumentParser
|
||||
|
||||
def get_parser(*args, **kwargs):
|
||||
from .parsers import TextDocumentParser
|
||||
|
||||
return TextDocumentParser(*args, **kwargs)
|
||||
|
||||
|
||||
def text_consumer_declaration(sender, **kwargs):
|
||||
return {
|
||||
"parser": TextDocumentParser,
|
||||
"parser": get_parser,
|
||||
"weight": 10,
|
||||
"mime_types": {
|
||||
"text/plain": ".txt",
|
||||
|
Reference in New Issue
Block a user