django-orchestra/orchestra/apps/resources/tasks.py

15 lines
378 B
Python
Raw Normal View History

2014-07-09 16:17:43 +00:00
from celery import shared_task
from .backends import ServiceMonitor
@shared_task
def monitor(backend_name):
routes = Route.objects.filter(is_active=True, backend=backend_name)
for route in routes:
pass
for backend in ServiceMonitor.get_backends():
if backend.get_name() == backend_name:
# TODO execute monitor BackendOperation
pass