mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-11-06 14:59:22 +00:00
lazy loading for parsers
This commit is contained in:
1 parent
883a6b26a4
commit
44ec3a3d9c
5 files changed
+20
-8
No files matched your search
@@ -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