publish should be called when the state is changed
publish should be called when the state is changed

publish should not be called during every wait cycle, only after the wait has found the correct state
Safihre/cherrypy,cherrypy/cherrypy,cherrypy/cherrypy,Safihre/cherrypy