示例#1
0
 def __init__(self, db, executor, api_user, api_key, sender, endpoint):
     super(MailAgent, self).__init__(db)
     self.mail_proxy = MailProxy(api_user=api_user,
                                 api_key=api_key,
                                 sender=sender,
                                 endpoint=endpoint)
     self.executor_driver_name = executor
     self.executor = get_executor(executor)
示例#2
0
 def __init__(self, db, executor, username, password,
              epid, endpoint, charset="gb2312"):
     super(SmsAgent, self).__init__(db)
     self.sms_proxy = SmsProxy(username=username,
                               password=password,
                               epid=epid,
                               endpoint=endpoint,
                               charset=charset)
     self.executor_driver_name = executor
     self.executor = get_executor(executor)
示例#3
0
文件: manager.py 项目: znavy/hmonitor
    def __init__(self, worker=8, executor="ssh"):
        self.worker = worker
        self.executor_driver_name = executor
        self.executor = get_executor(executor)
        self.db = HMonitorDB(mysql_user=options.mysql_user,
                             mysql_passwd=options.mysql_password,
                             mysql_host=options.mysql_host,
                             mysql_database=options.mysql_database)

        self.queue = Queue.Queue()

        for w in range(0, self.worker):
            t = threading.Thread(target=self.do_autofix)
            t.daemon = True
            t.start()
        logging.debug("START {0} WORKERS FOR AUTOFIX".format(self.worker))
示例#4
0
 def __init__(self,
              db,
              executor,
              username,
              password,
              epid,
              endpoint,
              charset="gb2312"):
     super(SmsAgent, self).__init__(db)
     self.sms_proxy = SmsProxy(username=username,
                               password=password,
                               epid=epid,
                               endpoint=endpoint,
                               charset=charset)
     self.executor_driver_name = executor
     self.executor = get_executor(executor)
示例#5
0
文件: manager.py 项目: QthCN/hmonitor
    def __init__(self, worker=8, executor="ssh"):
        self.worker = worker
        self.executor_driver_name = executor
        self.executor = get_executor(executor)
        self.db = HMonitorDB(mysql_user=options.mysql_user,
                             mysql_passwd=options.mysql_password,
                             mysql_host=options.mysql_host,
                             mysql_database=options.mysql_database)

        self.queue = Queue.Queue()

        for w in range(0, self.worker):
            t = threading.Thread(target=self.do_autofix)
            t.daemon = True
            t.start()
        logging.debug("START {0} WORKERS FOR AUTOFIX".format(self.worker))
示例#6
0
文件: manager.py 项目: znavy/hmonitor
 def __init__(self, db, executor, url):
     self.db = db
     self.executor_driver_name = executor
     self.executor = get_executor(executor)
     self.autofix_url = url
示例#7
0
文件: manager.py 项目: QthCN/hmonitor
 def __init__(self, db, executor, url):
     self.db = db
     self.executor_driver_name = executor
     self.executor = get_executor(executor)
     self.autofix_url = url