Adds cpu affinity for the workers. Courtesy of the optional psutil module.

This commit is contained in:
Ilan
2015-07-15 19:53:13 +02:00
parent 507ccf7e11
commit 2d0820e80b
6 changed files with 92 additions and 3 deletions
+3
View File
@@ -45,6 +45,9 @@ class Conf(object):
# The Django Admin label for this app
LABEL = conf.get('label', 'Django Q')
# Sets the number of processors for each worker, defaults to all.
CPU_AFFINITY = conf.get('cpu_affinity', 0)
# Use the secret key for package signing
# Django itself should raise an error if it's not configured
SECRET_KEY = settings.SECRET_KEY