当前位置: 首页>>代码示例>>Python>>正文


Python TacticServerStub.set_server方法代码示例

本文整理汇总了Python中tactic_client_lib.TacticServerStub.set_server方法的典型用法代码示例。如果您正苦于以下问题:Python TacticServerStub.set_server方法的具体用法?Python TacticServerStub.set_server怎么用?Python TacticServerStub.set_server使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在tactic_client_lib.TacticServerStub的用法示例。


在下文中一共展示了TacticServerStub.set_server方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: execute

# 需要导入模块: from tactic_client_lib import TacticServerStub [as 别名]
# 或者: from tactic_client_lib.TacticServerStub import set_server [as 别名]
    def execute(my):
        #protocol = 'xmlrpc'
        protocol = 'local'
        if protocol == 'local':
            server = TacticServerStub.get()
        else:
            server = TacticServerStub(protocol=protocol,setup=False)
            TacticServerStub.set(server)

            project = my.data.get("project")
            ticket = my.data.get("ticket")
            assert project
            assert ticket
            server.set_server("localhost")
            server.set_project(project)
            server.set_ticket(ticket)

        my.class_name = my.data.get('class_name')
        assert my.class_name
        my.kwargs = my.data.get('kwargs')
        if not my.kwargs:
            my.kwags = {}


        #trigger = eval("%s(**my.kwargs)" % my.class_name)
        trigger = Common.create_from_class_path(my.class_name, kwargs=my.kwargs)

        input_data = my.get_input_data()
        trigger.set_input(input_data)
        trigger.execute()
开发者ID:0-T-0,项目名称:TACTIC,代码行数:32,代码来源:subprocess_trigger.py

示例2: get_server

# 需要导入模块: from tactic_client_lib import TacticServerStub [as 别名]
# 或者: from tactic_client_lib.TacticServerStub import set_server [as 别名]
    def get_server(my):
        # do a query for the search
        from tactic_client_lib import TacticServerStub
        if my.protocol == 'xmlrpc':
            stub = TacticServerStub(setup=False, protocol=my.protocol)
            stub.set_server(my.host)
            stub.set_project(my.project_code)
            stub.set_ticket(my.ticket)
        else:
            stub = TacticServerStub.get()

        return stub
开发者ID:davidsouthpaw,项目名称:TACTIC,代码行数:14,代码来源:project.py

示例3: BaseClientCbk

# 需要导入模块: from tactic_client_lib import TacticServerStub [as 别名]
# 或者: from tactic_client_lib.TacticServerStub import set_server [as 别名]
class BaseClientCbk(object):
    def set_ticket(self, ticket):
        self.ticket = ticket

    def set_options(self, options):
        self.options = options

    def get_option(self, name):
        return self.options.get(name)


    def _execute(self):

        # get the server name
        server_name = self.get_option("server_name")
        if not server_name:
            raise ClientCallbackException("No [server_name] option delivered to callback")
        server_name = server_name[0]

        # get the project
        project_code = self.get_option("project_code")
        if not project_code:
            raise ClientCallbackException("No [project_code] option delivered to callback")
        project_code = project_code[0]

        # the entire pipeline is run in a TacticServer Transaction
        from tactic_client_lib import TacticServerStub
        self.server = TacticServerStub()
        self.server.set_server(server_name)
        self.server.set_ticket(self.ticket)
        self.server.set_project(project_code)


        self.server.start("Pipeline checkin")
        try:
            self.execute()

        except Exception, e:
            self.server.abort()
            raise
        else:
开发者ID:Southpaw-TACTIC,项目名称:TACTIC,代码行数:43,代码来源:callback.py

示例4: TacticSearch

# 需要导入模块: from tactic_client_lib import TacticServerStub [as 别名]
# 或者: from tactic_client_lib.TacticServerStub import set_server [as 别名]
		self.listNameSnapshots = []

		# Inicializando a classe que vare todo o servidor buscando caminhos de 
		# imagens do SAM.

		self.imagens, self.paths, self.paths01 = TacticSearch().getPathFiles("maya")

''' Toda parte de configuracao de servidor '''

		projeto_name = 'xxxx'
		ip_sever     = 'xxx.xxx.x.xx'

		if projeto_name:
			server = TacticServerStub()
			server.set_server(ip_sever)
			server.set_project(projeto_name)
			print 'OK server'
		else:
			print 'server down'

		search_type = projeto_name + '/shot'
		print 'USER LOGIN: %s' % (server.get_login())
		print server.build_search_type(search_type)

''' Inicializando a busca por arquvos '''

		# self.nameSnapshots()

	def converter_jpg(self, path):
		# Vai converter todas as imagens que forem necessarias.
开发者ID:ernandedante,项目名称:tactic,代码行数:32,代码来源:connect_up_command.py

示例5: execute

# 需要导入模块: from tactic_client_lib import TacticServerStub [as 别名]
# 或者: from tactic_client_lib.TacticServerStub import set_server [as 别名]
    def execute(self):
        #protocol = 'xmlrpc'


        protocol = 'local'
        if protocol == 'local':
            server = TacticServerStub.get()
        else:
            server = TacticServerStub(protocol=protocol,setup=False)
            TacticServerStub.set(server)

            project = self.data.get("project")
            ticket = self.data.get("ticket")
            assert project
            assert ticket
            server.set_server("localhost")
            server.set_project(project)
            server.set_ticket(ticket)

        self.class_name = self.data.get('class_name')
        assert self.class_name
        self.kwargs = self.data.get('kwargs')
        if not self.kwargs:
            self.kwags = {}


        #trigger = eval("%s(**self.kwargs)" % self.class_name)
        trigger = Common.create_from_class_path(self.class_name, kwargs=self.kwargs)

        input_data = self.get_input_data()
        trigger.set_input(input_data)

        try:
            trigger.execute()

            info = trigger.get_info()
            result = info.get("result")
            if result is not None:

                # map booleans to a message
                if result in ['true', True]:
                    result = 'complete'

                elif result in ['false', False]:
                    result = 'revise'

                self.set_pipeline_status(result)
                self.info['result'] = result
            else:
                self.set_pipeline_status("complete")
                self.info['result'] = "complete"


        except Exception as e:
            #self.set_pipeline_status("error", {"error": str(e)})
            self.set_pipeline_status("revise", {"error": str(e)})

            import sys,traceback

            print("Error: ", e)
            # print the stacktrace
            tb = sys.exc_info()[2]
            stacktrace = traceback.format_tb(tb)
            stacktrace_str = "".join(stacktrace)
            print("-"*50)
            print(stacktrace_str)
            print(str(e))
            print("-"*50)

            self.info['result'] = "error"
            self.info['message'] = str(e)
开发者ID:mincau,项目名称:TACTIC,代码行数:73,代码来源:subprocess_trigger.py


注:本文中的tactic_client_lib.TacticServerStub.set_server方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。