initiating thread in a more appropriate place

master
Steve L. Nyemba 8 years ago
parent 9be4fe836e
commit 524376bb70

@ -61,11 +61,6 @@ factory = DataSourceFactory()
gWriter = factory.instance(type='CouchdbWriter',args=p)
gReader = factory.instance(type='CouchdbReader',args=p)
mthread = monitor.Monitor(HANDLERS,gWriter,'processes',)
mthread.start()
#(Timer(10,mthread.run)).start()
#mthread = Process(target=monitor.Monitor,args=(HANDLERS,ProcessQueue,'processes'))
#mthread.start()
@app.route('/get/<id>')
def procs(id):
@ -102,6 +97,9 @@ def dashboard():
context = PARAMS['context']
return render_template('dashboard.html',context=context)
if __name__== '__main__':
mthread.start()
app.secret_key = 'A0Zr98j/3yX R~XHH!jmN]LWX=?RT'
app.run(host='0.0.0.0',debug=True,threaded=True)

Loading…
Cancel
Save