mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 03:16:10 -06:00 
			
		
		
		
	Merge pull request #33 from pitkley/fix/parallelism
Ensure `OCR_THREADS` is integer, add documentation
This commit is contained in:
		@@ -58,6 +58,11 @@ Standard (Bare Metal)
 | 
			
		||||
      passphrase from the environment, so if you don't set it to a static value
 | 
			
		||||
      here, you must set ``PAPERLESS_PASSPHRASE=some-secret-string`` on the
 | 
			
		||||
      command line whenever invoking the consumer or webserver.
 | 
			
		||||
    * ``OCR_THREADS``: this is the number of threads the OCR process will spawn
 | 
			
		||||
      to process document pages in parallel. The default value gets sourced from
 | 
			
		||||
      the environment-variable ``PAPERLESS_OCR_THREADS`` and expects it to be an
 | 
			
		||||
      integer. If the variable is not set, Python determines the core-count of
 | 
			
		||||
      your CPU and uses that value.
 | 
			
		||||
4. Initialise the database with ``./manage.py migrate``.
 | 
			
		||||
5. Create a user for your Paperless instance with
 | 
			
		||||
   ``./manage.py createsuperuser``. Follow the prompts to create your user.
 | 
			
		||||
 
 | 
			
		||||
@@ -52,7 +52,7 @@ class Consumer(Renderable):
 | 
			
		||||
    SCRATCH = settings.SCRATCH_DIR
 | 
			
		||||
    CONVERT = settings.CONVERT_BINARY
 | 
			
		||||
    CONSUME = settings.CONSUMPTION_DIR
 | 
			
		||||
    THREADS = settings.OCR_THREADS
 | 
			
		||||
    THREADS = int(settings.OCR_THREADS) if settings.OCR_THREADS else None
 | 
			
		||||
 | 
			
		||||
    OCR = pyocr.get_available_tools()[0]
 | 
			
		||||
    DEFAULT_OCR_LANGUAGE = settings.OCR_LANGUAGE
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user