Commit 671924c1 authored by Vladislav Rykov's avatar Vladislav Rykov
Browse files

maintainer workers deactivated

parent 957de63d
**.swp
**.pyc
...@@ -12,5 +12,8 @@ mail = Mail(app) ...@@ -12,5 +12,8 @@ mail = Mail(app)
from app import views from app import views
from app import views_admin from app import views_admin
from app.helpers import maintainer # No need anymore in maintainer since
# 1) Notifications are fired in soft real time
# 2) data folder is cleaned after every csv download
# from app.helpers import maintainer
from app.helpers import notification_manager from app.helpers import notification_manager
...@@ -514,7 +514,6 @@ def application_new_alert(appkey): ...@@ -514,7 +514,6 @@ def application_new_alert(appkey):
res = nfs.create(nid, appkey, request.form['devid'], request.form['alertname'], desc, 'alert', request.form['alertemail']) res = nfs.create(nid, appkey, request.form['devid'], request.form['alertname'], desc, 'alert', request.form['alertemail'])
if res[0]: if res[0]:
# create new function and trigger # create new function and trigger
#tr.create_function(appkey, request.form['devid'], nid, [request.form['varname'],request.form['operation'],request.form['avalue']])
t = tr.create_function_rt(appkey, request.form['devid'], nid, [request.form['varname'],request.form['operation'],request.form['avalue']],'alert',request.form['alertemail']) t = tr.create_function_rt(appkey, request.form['devid'], nid, [request.form['varname'],request.form['operation'],request.form['avalue']],'alert',request.form['alertemail'])
print(t) print(t)
tr.create(appkey, request.form['devid'], nid) tr.create(appkey, request.form['devid'], nid)
...@@ -580,7 +579,6 @@ def application_new_automation(appkey): ...@@ -580,7 +579,6 @@ def application_new_automation(appkey):
res = nfs.create(nid, appkey, request.form['devid'], request.form['automationname'], desc, 'automation', action) res = nfs.create(nid, appkey, request.form['devid'], request.form['automationname'], desc, 'automation', action)
if res[0]: if res[0]:
# create new function and trigger # create new function and trigger
#tr.create_function(appkey, request.form['devid'], nid, [request.form['varname'],request.form['operation'],request.form['avalue']])
t = tr.create_function_rt(appkey, request.form['devid'], nid, [request.form['varname'],request.form['operation'],request.form['avalue']],'automation', action) t = tr.create_function_rt(appkey, request.form['devid'], nid, [request.form['varname'],request.form['operation'],request.form['avalue']],'automation', action)
tr.create(appkey, request.form['devid'], nid) tr.create(appkey, request.form['devid'], nid)
flash('Automation created', 'success') flash('Automation created', 'success')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment