2015-05-07 14:09:37 +00:00
|
|
|
from django.apps import AppConfig
|
2015-05-09 18:53:23 +00:00
|
|
|
from django.utils.module_loading import autodiscover_modules
|
2015-05-07 14:09:37 +00:00
|
|
|
|
|
|
|
from orchestra.core import administration
|
|
|
|
|
|
|
|
|
|
|
|
class TasksConfig(AppConfig):
|
|
|
|
name = 'orchestra.contrib.tasks'
|
|
|
|
verbose_name = "Tasks"
|
|
|
|
|
|
|
|
def ready(self):
|
|
|
|
from djcelery.models import PeriodicTask, TaskState, WorkerState
|
|
|
|
administration.register(TaskState, icon='Edit-check-sheet.png')
|
|
|
|
administration.register(PeriodicTask, parent=TaskState, icon='Appointment.png')
|
|
|
|
administration.register(WorkerState, parent=TaskState, dashboard=False)
|
2015-05-09 18:53:23 +00:00
|
|
|
autodiscover_modules('tasks')
|