# 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.
PULP_CONCURRENCY=<%= scope['pulp::num_workers'] %>

# Configure Python's encoding for writing all logs, stdout and stderr
PYTHONIOENCODING="UTF-8"

<% unless [nil, :undefined, :undef, '', 0].include?(scope.lookupvar('pulp::max_tasks_per_child')) %>
# To avoid memory leaks, Pulp can terminate and replace a worker after processing X tasks. If
# left commented, process recycling is disabled. PULP_MAX_TASKS_PER_CHILD must be > 0.
PULP_MAX_TASKS_PER_CHILD=<%= scope['pulp::max_tasks_per_child'] %>
<% end %>
