def onSettingsChanged(self): try: init() urllib_request.urlopen("%s/reload" % ELEMENTUMD_HOST) urllib_request.urlopen("%s/cmd/clear_page_cache" % ELEMENTUMD_HOST) except: pass
def onSettingsChanged(self): log.debug('{0}.onSettingsChanged()'.format(self)) try: init() urllib_request.urlopen("%s/reload" % ELEMENTUMD_HOST) urllib_request.urlopen("%s/cmd/clear_page_cache" % ELEMENTUMD_HOST) except: pass
def restart(self): try: init() urllib_request.urlopen("%s/restart" % ELEMENTUMD_HOST) except: pass
import os import sys sys.path.insert( 0, os.path.join(os.path.dirname(__file__), 'resources', 'site-packages')) from elementum import service, config config.init() service.run()