mirror of
				https://github.com/paperless-ngx/paperless-ngx.git
				synced 2025-11-03 03:16:10 -06:00 
			
		
		
		
	Make Worker Timeout Configurable (#37)
* Make Worker Timeout Configurable - defaults to 1800 seconds - can be configured through environment for systems with weaker CPUs - description added to documentation Co-authored-by: evilsidekick <>
This commit is contained in:
		@@ -514,6 +514,12 @@ PAPERLESS_THREADS_PER_WORKER=<num>
 | 
				
			|||||||
    PAPERLESS_THREADS_PER_WORKER automatically.
 | 
					    PAPERLESS_THREADS_PER_WORKER automatically.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					PAPERLESS_WORKER_TIMEOUT=<num>
 | 
				
			||||||
 | 
					    Machines with few cores or weak ones might not be able to finish OCR on
 | 
				
			||||||
 | 
					    large documents within the default 1800 seconds. So extending this timeout
 | 
				
			||||||
 | 
					    may prove to be useful on weak hardware setups.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
PAPERLESS_TIME_ZONE=<timezone>
 | 
					PAPERLESS_TIME_ZONE=<timezone>
 | 
				
			||||||
    Set the time zone here.
 | 
					    Set the time zone here.
 | 
				
			||||||
    See https://docs.djangoproject.com/en/3.1/ref/settings/#std:setting-TIME_ZONE
 | 
					    See https://docs.djangoproject.com/en/3.1/ref/settings/#std:setting-TIME_ZONE
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -423,7 +423,7 @@ Q_CLUSTER = {
 | 
				
			|||||||
    'catch_up': False,
 | 
					    'catch_up': False,
 | 
				
			||||||
    'recycle': 1,
 | 
					    'recycle': 1,
 | 
				
			||||||
    'retry': 1800,
 | 
					    'retry': 1800,
 | 
				
			||||||
    'timeout': 1800,
 | 
					    'timeout': int(os.getenv("PAPERLESS_WORKER_TIMEOUT", 1800)),
 | 
				
			||||||
    'workers': TASK_WORKERS,
 | 
					    'workers': TASK_WORKERS,
 | 
				
			||||||
    'redis': os.getenv("PAPERLESS_REDIS", "redis://localhost:6379")
 | 
					    'redis': os.getenv("PAPERLESS_REDIS", "redis://localhost:6379")
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user