PulpWorkerDefaults - file /etc/default/pulp_workers

The PulpWorkerDefaults parser reads the shell options set in the /etc/default/pulp_worker file. These are made available using the insights.core.SysconfigOptions class methods.

Sample file contents:

# Configuration file for Pulp's Celery workers

# Define the number of worker nodes you wish to have here. This defaults to the number of processors
# that are detected on the system if left commented here.

# Configure Python's encoding for writing all logs, stdout and stderr


>>> pulp_defs = shared[PulpWorkerDefaults]
>>> type(pulp_defs)
<class 'insights.parsers.pulp_worker_defaults.PulpWorkerDefaults'>
>>> 'PULP_CONCURRENCY' in pulp_defs
>>> pulp_defs['PULP_CONCURRENCY']  # Note string return value
>>> 'PULP_MAX_TASKS_PER_CHILD' in pulp_defs
>>> pulp_defs['PYTHONIOENCODING']  # Values are dequoted as per bash
class insights.parsers.pulp_worker_defaults.PulpWorkerDefaults(context)[source]

Bases: SysconfigOptions

Parse the /etc/default/pulp_workers file.