Exemplo n.º 1
0
 def fsvr_ip(self):
     #get local ip info
     return get_local_ip()
Exemplo n.º 2
0
#!-*-coding:utf8-*-
import os
import time
from comm.log import log
from comm.run_cmd import get_local_ip
from comm.http_helper import HttpHelper

local_ip = get_local_ip()

class CallbackTaskInfo():
    """"""
    def __init__(self):
        self._http_obj = HttpHelper()
        pass
    
    def run(self,dict_info={}):
        #step-1:check info integrate or not
        c_method = dict_info.get("method","")
        c_taskid=dict_info.get("taskid","")
        c_detail = dict_info.get("detail",[])
        c_ip = dict_info.get("ip","")
        c_port = dict_info.get("port","")
        c_url = dict_info.get("url","")
        c_result = dict_info.get("result","")
        #
        if not c_method or not c_taskid or not c_detail:
            code = 1
            msg = u"[CallbackTaskInfo]error,miss params[method or taskid or detail] or params is null."
            return (False,code,msg)
        #step-2:
        self.callback_result(method = c_method,taskid=c_taskid,detail=c_detail,