class DateNodeConfZk(APIHandler): stat_opers = NodeStatOpers() @asynchronous @engine def get(self): result = yield self.do() self.finish(result) @run_on_executor() @run_callback def do(self): return_dict = self.stat_opers.stat_node_zk_address() return return_dict
class StatNodeDiskEnough(APIHandler): stat_opers = NodeStatOpers() @asynchronous @engine def get(self): result = yield self.do() self.finish(result) @run_on_executor() @run_callback def do(self): return_dict = self.stat_opers.stat_diskspace_enough_for_backup() return return_dict
class StatNodeMemorySize(APIHandler): stat_opers = NodeStatOpers() @asynchronous @engine def get(self): result = yield self.do() self.finish(result) @run_on_executor() @run_callback def do(self): return_dict = self.stat_opers.stat_node_memory() return return_dict
class StatMysqlCpuPartion(APIHandler): stat_opers = NodeStatOpers() @asynchronous @engine def get(self): result = yield self.do() self.finish(result) @run_on_executor() @run_callback def do(self): return_dict = self.stat_opers.stat_mysql_cpu() return return_dict
class StatNodeWorkLoad(APIHandler): stat_opers = NodeStatOpers() def get(self): result = self.stat_opers.stat_work_load() self.finish(result)
class StatDiskAvailable(APIHandler): stat_opers = NodeStatOpers() def get(self): result = self.stat_opers.stat_data_disk_available() self.finish(result)