mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-11 09:07:18 +01:00
lazy loading for parsers
This commit is contained in:
parent
883a6b26a4
commit
44ec3a3d9c
5 changed files with 20 additions and 8 deletions
|
|
@ -1,9 +1,13 @@
|
|||
from .parsers import RasterisedDocumentParser
|
||||
|
||||
def get_parser(*args, **kwargs):
|
||||
from .parsers import RasterisedDocumentParser
|
||||
|
||||
return RasterisedDocumentParser(*args, **kwargs)
|
||||
|
||||
|
||||
def tesseract_consumer_declaration(sender, **kwargs):
|
||||
return {
|
||||
"parser": RasterisedDocumentParser,
|
||||
"parser": get_parser,
|
||||
"weight": 0,
|
||||
"mime_types": {
|
||||
"application/pdf": ".pdf",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue