Added admin pages for failures and success.

SAVE_LIMIT can now be set to limit the amount of saved tasks results.
This commit is contained in:
Ilan Steemers
2015-06-17 15:32:54 +02:00
parent 727a4d560d
commit e473665760
5 changed files with 138 additions and 27 deletions
+15 -1
View File
@@ -6,14 +6,28 @@ class SessionAdminConfig(AppConfig):
name = 'django_q'
verbose_name = "Django Q"
"""
Sets the logging level for the app
"""
try:
LOG_LEVEL = settings.Q_LOG_LEVEL
except AttributeError:
LOG_LEVEL = "INFO"
"""
Using Django's secret key to sign task packages
"""
try:
SECRET_KEY = settings.SECRET_KEY
except AttributeError:
SECRET_KEY = 'omgicantbelieveyoudonthaveasecretkey'
"""
SAVE_LIMIT limits the amount of successful task executions saved to the database.
Set this to 0 for no limits.
Failures are not limited.
"""
try:
SAVE_LIMIT = settings.Q_SAVE_LIMIT
except AttributeError:
SAVE_LIMIT = 100