summaryrefslogtreecommitdiffstats
path: root/ocata/ocata/vesagent/vesagent_ctrl.py
diff options
context:
space:
mode:
authorYun Huang <yun.huang@windriver.com>2018-07-04 17:49:42 +0800
committerYun Huang <yun.huang@windriver.com>2018-07-04 17:49:42 +0800
commit09a45a5c8fa4906bee65cc2268a4d17e6defe44f (patch)
tree49e300568a21d2cc91d4615776de39cf5f3c8e6e /ocata/ocata/vesagent/vesagent_ctrl.py
parent6455cf7852129b9dfcc0a7679df254a4e44533c6 (diff)
Add the vesagent worker scheduler as celery task
The vesagent configurion logic will trigger the vesagent worker scheduler via celery Change-Id: I14aba0c411bdfaae1a9a993e16fbdb8fde485bce Issue-ID: MULTICLOUD-230 Signed-off-by: Yun Huang <yun.huang@windriver.com>
Diffstat (limited to 'ocata/ocata/vesagent/vesagent_ctrl.py')
-rw-r--r--ocata/ocata/vesagent/vesagent_ctrl.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/ocata/ocata/vesagent/vesagent_ctrl.py b/ocata/ocata/vesagent/vesagent_ctrl.py
index 421959e8..f99ac462 100644
--- a/ocata/ocata/vesagent/vesagent_ctrl.py
+++ b/ocata/ocata/vesagent/vesagent_ctrl.py
@@ -22,6 +22,7 @@ from rest_framework.views import APIView
from django.conf import settings
from common.msapi import extsys
+from ocata.vesagent.tasks import scheduleBacklogs
from ocata.vesagent.event_domain.fault_vm import buildBacklog_fault_vm
from django.core.cache import cache
@@ -257,6 +258,8 @@ class VesAgentCtrl(APIView):
# cache forever
cache.set("VesAgentBacklogs.config.%s" % vimid, VesAgentBacklogsConfigStr, None)
+ # notify schduler
+ scheduleBacklogs.delay(vimid)
except Exception as e:
self._logger.error("exception:%s" % str(e))
VesAgentBacklogsConfig = {"error":"exception occurs during build backlogs"}