mirror of
https://github.com/jazzband/django-celery-monitor.git
synced 2026-03-16 22:00:24 +00:00
Run django.setup() when Camera is being installed.
This commit is contained in:
parent
a9c514fabd
commit
87be921761
1 changed files with 8 additions and 0 deletions
|
|
@ -49,6 +49,14 @@ class Camera(Polaroid):
|
|||
'monitors_expire_pending': timedelta(days=5),
|
||||
})
|
||||
|
||||
def django_setup(self):
|
||||
import django
|
||||
django.setup()
|
||||
|
||||
def install(self):
|
||||
super(Camera, self).install()
|
||||
self.django_setup()
|
||||
|
||||
@property
|
||||
def expire_task_states(self):
|
||||
"""Return a twople of Celery task states and expiration timedeltas."""
|
||||
|
|
|
|||
Loading…
Reference in a new issue