plugins.spec.runtime_scratch
plugins.spec.runtime_scratch()One scratch directory for this process, removed when it exits.
The Tesseract runtime writes a run_<uuid>/logs/ directory per endpoint call and never cleans it up. In-process that lands in an unmanaged mkdtemp; served, it lands in the server’s working directory — which is why an unconfigured tesseract-runtime serve started from a checkout fills it with run_*. This function is the one answer to both: :meth:PluginSpec.open passes it to Tesseract.from_tesseract_api as output_path, and a server should be started with TESSERACT_OUTPUT_PATH (:data:SERVED_OUTPUT_ENV) set to it or to any other path outside the repository.
Created on first use and registered for removal with :mod:atexit, so a long optimization’s thousands of run directories do not outlive the process that made them.
Returns
| Name | Type | Description |
|---|---|---|
| Path | The per-process scratch directory. |