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


Python TacticServerStub.get方法代码示例

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


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

示例1: get_display

# 需要导入模块: from client.tactic_client_lib import TacticServerStub [as 别名]
# 或者: from client.tactic_client_lib.TacticServerStub import get [as 别名]
 def get_display(my):
     import re
     from client.tactic_client_lib import TacticServerStub
     from tactic.ui.panel import FastTableLayoutWdg
     server = TacticServerStub.get()
     sk = str(my.kwargs.get('sk'))
     splits = sk.split('code=')
     search_type = splits[0].split('?')[0];
     code = splits[1];
     search_id = re.findall(r'\d+', code)
     search_id = int(search_id[0])
     widget = DivWdg()
     table = Table()
     table.add_attr('class','snapshot_viewer_wdg')
     table.add_attr('sk',sk)
     #ftl = FastTableLayoutWdg(search_type='sthpw/snapshot', view='table', element_names='preview,process,description,web_path,timestamp,login', show_row_select=True, search_key=sk, show_gear=False, show_shelf=False, show_select=True, width='100%s' % '%', show_column_manager=False, expression="@UNION(@SOBJECT(sthpw/snapshot),@SOBJECT(sthpw/note.sthpw/snapshot))", temp=True)
     if search_type == 'sthpw/note':
         expression = "@SOBJECT(sthpw/snapshot)"
     else:
         expression="@UNION(@SOBJECT(sthpw/snapshot),@SOBJECT(sthpw/note.sthpw/snapshot))"
     ftl = FastTableLayoutWdg(search_type='sthpw/snapshot', view='snapshot_by_process', show_row_select=True, search_key=sk, show_gear=False, show_shelf=False, show_select=True, height='300px', width='100%s' % '%', show_column_manager=False, expression=expression, temp=True)
     table.add_row()
     table.add_cell(ftl) 
     widget.add(table)
     return widget
开发者ID:2gDigitalPost,项目名称:custom,代码行数:27,代码来源:uploader.py

示例2: init

# 需要导入模块: from client.tactic_client_lib import TacticServerStub [as 别名]
# 或者: from client.tactic_client_lib.TacticServerStub import get [as 别名]
    def init(my):
        from client.tactic_client_lib import TacticServerStub

        my.server = TacticServerStub.get()
        my.login = Environment.get_login()
        my.user = my.login.get_login()
        my.work_order_code = ""
开发者ID:2gDigitalPost,项目名称:custom,代码行数:9,代码来源:eq_hours_display.py

示例3: init

# 需要导入模块: from client.tactic_client_lib import TacticServerStub [as 别名]
# 或者: from client.tactic_client_lib.TacticServerStub import get [as 别名]
 def init(my):
     from client.tactic_client_lib import TacticServerStub
     my.login_obj = Environment.get_login()
     my.login = my.login_obj.get_login()
     my.server = TacticServerStub.get()
     my.login_obj = my.server.eval("@SOBJECT(sthpw/login['login','%s'])" % my.login)[0]
     my.key_dict = {'highlight_notes': 'Highlight Notes - Record What I Have Seen (Slower)]:', 'show_note_counts': 'Show Top Section of Notes, Showing Count Breakdown:'}
开发者ID:2gDigitalPost,项目名称:custom,代码行数:9,代码来源:preferences.py

示例4: init

# 需要导入模块: from client.tactic_client_lib import TacticServerStub [as 别名]
# 或者: from client.tactic_client_lib.TacticServerStub import get [as 别名]
 def init(my):
     from client.tactic_client_lib import TacticServerStub
     from pyasm.common import Environment
     my.server = TacticServerStub.get()
     my.sk = ''
     my.login = '' 
     my.order_code = ''
开发者ID:2gDigitalPost,项目名称:custom,代码行数:9,代码来源:cost_calculator.py

示例5: init

# 需要导入模块: from client.tactic_client_lib import TacticServerStub [as 别名]
# 或者: from client.tactic_client_lib.TacticServerStub import get [as 别名]
 def init(my):
     my.server = TacticServerStub.get()
     my.title = "Project"
     my.sk = ''
     my.code = ''
     my.search_id = ''
     my.parent_sk = ''
     my.parent_sid = ''
     my.order_sk = ''
     my.x_butt = "<img src='/context/icons/common/BtnKill.gif' title='Delete' name='Delete'/>"
     my.scratch_pipe = "<table border=0 cellspacing=0 cellpadding=2 style='font-size: 60%s; border-color: #FFFFFF; border-style: solid; border-width: 1px; cursor: pointer;'><tr><td align='center'><font color='#FFFFFF'>Pipeline</font></td></tr></table>" % '%'
     my.width = '1000px'
     my.height = '300px'
     my.small = False
     my.disp_mode = 'Small'
     my.groups_str = ''
     my.user = ''
     my.is_master = False
     my.is_master_str = 'false'
     my.on_color = '#ff0000'
     my.off_color = '#d9ed8b'
     my.stat_colors = {
         'Assignment': '#fcaf88',
         'Pending': '#d7d7d7',
         'In Progress': '#f5f3a4',
         'In_Progress': '#f5f3a4',
         'In Production': '#f5f3a4',
         'In_Production': '#f5f3a4',
         'In production': '#f5f3a4',
         'In_production': '#f5f3a4',
         'Waiting': '#ffd97f',
         'Need Assistance': '#fc88fb',
         'Need_Assistance': '#fc88fb',
         'Review': '#888bfc',
         'Approved': '#d4b5e7',
         'On Hold': '#e8b2b8',
         'On_Hold': '#e8b2b8',
         'Client Response': '#ddd5b8',
         'Completed': '#b7e0a5',
         'Ready': '#b2cee8',
         'Internal Rejection': '#ff0000',
         'External Rejection': '#ff0000',
         'Rejected': '#ff0000',
         'Failed QC': '#ff0000',
         'Fix Needed': '#c466a1',
         'Need Buddy Check': '#e3701a',
         'DR In_Progress': '#d6e0a4',
         'DR In Progress': '#d6e0a4',
         'Amberfin01_In_Progress':'#D8F1A8',
         'Amberfin01 In Progress':'#D8F1A8',
         'Amberfin02_In_Progress':'#F3D291',
         'Amberfin02 In Progress':'#F3D291',
         'BATON In_Progress': '#c6e0a4',
         'BATON In Progress': '#c6e0a4',
         'Export In_Progress': '#796999',
         'Export In Progress': '#796999',
         'Buddy Check In_Progress': '#1aade3',
         'Buddy Check In Progress': '#1aade3'
     }
开发者ID:2gDigitalPost,项目名称:custom,代码行数:61,代码来源:proj_row.py

示例6: __init__

# 需要导入模块: from client.tactic_client_lib import TacticServerStub [as 别名]
# 或者: from client.tactic_client_lib.TacticServerStub import get [as 别名]
 def __init__(my, **kwargs):
     from client.tactic_client_lib import TacticServerStub
     from pyasm.common import Environment
     super(ClipboardEmptySearchTypeCmd, my).__init__(**kwargs)
     my.login = Environment.get_login()
     my.user_name = my.login.get_login() 
     my.server = TacticServerStub.get()
     my.search_type = str(kwargs.get('search_type'))
开发者ID:2gDigitalPost,项目名称:custom,代码行数:10,代码来源:commander.py

示例7: init

# 需要导入模块: from client.tactic_client_lib import TacticServerStub [as 别名]
# 或者: from client.tactic_client_lib.TacticServerStub import get [as 别名]
 def init(my):
     from client.tactic_client_lib import TacticServerStub
     my.server = TacticServerStub.get()
     my.login = Environment.get_login()
     my.user = my.login.get_login()
     my.task_code = ''
     my.task_codes = ''
     my.code = ''
开发者ID:2gDigitalPost,项目名称:custom,代码行数:10,代码来源:work_hours_display.py

示例8: init

# 需要导入模块: from client.tactic_client_lib import TacticServerStub [as 别名]
# 或者: from client.tactic_client_lib.TacticServerStub import get [as 别名]
 def init(my):
     from client.tactic_client_lib import TacticServerStub
     from pyasm.common import Environment
     my.server = TacticServerStub.get()
     my.number = 0
     my.code = ''
     my.login = Environment.get_login()
     my.user = my.login.get_login()
     my.width = '1000px'
     my.height = '300px'
开发者ID:2gDigitalPost,项目名称:custom,代码行数:12,代码来源:inbox_wdg.py

示例9: init

# 需要导入模块: from client.tactic_client_lib import TacticServerStub [as 别名]
# 或者: from client.tactic_client_lib.TacticServerStub import get [as 别名]
 def init(my):
     my.server = TacticServerStub.get()
     my.sk = ''
     my.search_id = ''
     my.code = ''
     my.user = ''
     my.groups_str = ''
     my.parent_sk = ''
     my.parent_sid = ''
     my.order_sk = ''
     my.disp_mode = 'Small'
     my.small = False
     my.is_master = False
     my.is_master_str = 'false'
     my.on_color = '#ff0000'
     my.off_color = '#c6eda0'
     my.stat_colors = {
         'Assignment': '#fcaf88',
         'Pending': '#d7d7d7',
         'In Progress': '#f5f3a4',
         'In_Progress': '#f5f3a4',
         'In Production': '#f5f3a4',
         'In_Production': '#f5f3a4',
         'In production': '#f5f3a4',
         'In_production': '#f5f3a4',
         'Waiting': '#ffd97f',
         'Need Assistance': '#fc88fb',
         'Need_Assistance': '#fc88fb',
         'Review': '#888bfc',
         'Approved': '#d4b5e7',
         'On Hold': '#e8b2b8',
         'On_Hold': '#e8b2b8',
         'Client Response': '#ddd5b8',
         'Completed': '#b7e0a5',
         'Ready': '#b2cee8',
         'Internal Rejection': '#ff0000',
         'External Rejection': '#ff0000',
         'Rejected': '#ff0000',
         'Failed QC': '#ff0000',
         'Fix Needed': '#c466a1',
         'Need Buddy Check': '#e3701a',
         'DR In_Progress': '#d6e0a4',
         'DR In Progress': '#d6e0a4',
         'Amberfin01_In_Progress':'#D8F1A8',
         'Amberfin01 In Progress':'#D8F1A8',
         'Amberfin02_In_Progress':'#F3D291',
         'Amberfin02 In Progress':'#F3D291',
         'BATON In_Progress': '#c6e0a4',
         'BATON In Progress': '#c6e0a4',
         'Export In_Progress': '#796999',
         'Export In Progress': '#796999',
         'Buddy Check In_Progress': '#1aade3',
         'Buddy Check In Progress': '#1aade3'
     }
开发者ID:2gDigitalPost,项目名称:custom,代码行数:56,代码来源:work_order_row.py

示例10: init

# 需要导入模块: from client.tactic_client_lib import TacticServerStub [as 别名]
# 或者: from client.tactic_client_lib.TacticServerStub import get [as 别名]
 def init(my):
     my.group_list = Environment.get_group_names()
     login = Environment.get_login()
     my.user = login.get_login()
     my.server = TacticServerStub.get()
     my.sk = ''
     my.code = ''
     my.st = ''
     my.is_scheduler = False
     for gname in my.group_list:
         if 'scheduling' in gname:
             my.is_scheduler = True
     if my.user == 'admin':
         my.is_scheduler = True
开发者ID:2gDigitalPost,项目名称:custom,代码行数:16,代码来源:taskobjlauncher.py

示例11: get_display

# 需要导入模块: from client.tactic_client_lib import TacticServerStub [as 别名]
# 或者: from client.tactic_client_lib.TacticServerStub import get [as 别名]
 def get_display(my):
     import time, datetime
     from tactic_client_lib import TacticServerStub
     from pyasm.common import Environment
     code = ''
     fault_files = None
     rowct = 1
     server = TacticServerStub.get()
     if 'external_rejection_code' in my.kwargs.keys():
         code = my.kwargs.get('external_rejection_code')
         fault_files = server.eval("@SOBJECT(twog/external_rej_at_fault_files['external_rejection_code','%s'])" % code) 
     if 'rowct' in my.kwargs.keys():
         rowct = int(my.kwargs.get('rowct'))
     adding = False
     if 'adding' in my.kwargs.keys():
         if my.kwargs.get('adding') == 'true':
             adding = True
     table = Table()
     table.add_attr('class','fftable')
     table.add_attr('border','1')
     if rowct == 1 and not adding:
         table.add_row()
         table.add_cell("<b>List of At-Fault Files:</b>")
     if code not in [None,''] and not adding:
         for ff in fault_files:
             brow = table.add_row()
             brow.add_attr('line',rowct)
             brow.add_attr('code',ff.get('code'))
             brow.add_attr('prev',ff.get('file_path'))
             brow.add_attr('sk',ff.get('__search_key__'))
             brow.add_attr('class','fault_files')
             table.add_cell(my.txtbox('file_path-%s' % rowct, ff.get('file_path'),width='700px'))
             killer = table.add_cell('<b>X</b>')#This must delete the entry
             killer.add_style('cursor: pointer;')
             killer.add_behavior(my.get_kill_bvr(rowct, code, ff.get('code')))
             rowct = rowct + 1
     erow = table.add_row()
     erow.add_attr('line',rowct)
     erow.add_attr('code','')
     erow.add_attr('prev','')
     erow.add_attr('sk','')
     erow.add_attr('class','fault_files')
     table.add_cell(my.txtbox('file_path-%s' % rowct, '',width='700px'))
     addnew = table.add_cell('<b>+</b>')#This must add new entry
     addnew.add_style('cursor: pointer;')
     addnew.add_behavior(my.get_add_line(rowct, code, ''))
     erow2 = table.add_row()
     erow2.add_attr('class','new_ff_line')
     return table
开发者ID:Smurgledwerf,项目名称:custom,代码行数:51,代码来源:error_viewer.py

示例12: init

# 需要导入模块: from client.tactic_client_lib import TacticServerStub [as 别名]
# 或者: from client.tactic_client_lib.TacticServerStub import get [as 别名]
 def init(my):
     from client.tactic_client_lib import TacticServerStub
     from pyasm.common import Environment
     my.server = TacticServerStub.get()
     my.sk = ''
     my.code = ''
     my.video_reasons = {'Cropping': 'video_cropping_reason','Digital Hits / Macroblocking': 'video_digihits_reason', 'Dropped Frames': 'video_dropped_frames_reason', 'Dropout': 'video_dropout_reason', 'Duplicate Frames': 'video_duplicate_frames_reason', 'Interlacing on a progressive file': 'video_interlacing_progressive_reason', 'Motion/Image Lag': 'video_motion_lag_reason', 'Missing elements': 'video_missing_elements_reason', 'Corrupt file': 'video_corrupt_file_reason', 'Incorrect aspect ratio': 'video_bad_aspect_ratio_reason', 'Incorrect resolution': 'video_bad_resolution_reason', 'Incorrect pixel aspect ratio': 'video_bad_pixel_aspect_ratio_reason', 'Incorrect specifications': 'video_bad_specifications_reason', ' Incorrect head/tail format': 'video_bad_head_tail_reason', 'Other issue': 'video_other_reason'}
     my.video_reasons_arr = ['Cropping','Digital Hits / Macroblocking', 'Dropped Frames', 'Dropout', 'Duplicate Frames', 'Interlacing on a progressive file', 'Motion/Image Lag', 'Missing elements', 'Corrupt file', 'Incorrect aspect ratio', 'Incorrect resolution', 'Incorrect pixel aspect ratio', 'Incorrect specifications', ' Incorrect head/tail format', 'Other issue']
     my.audio_reasons = {'Incorrect Audio Mapping': 'audio_bad_mapping_reason', 'Missing Audio Channel': 'audio_missing_audio_channel_reason', 'Crackle/Hiss/Pop/Static/Ticks': 'audio_crackle_reason', 'Distortion': 'audio_distortion_reason', 'Dropouts': 'audio_dropouts_reason', 'Sync issue': 'audio_sync_reason', 'Missing elements': 'audio_missing_elements_reason', 'Corrupt file / missing file': 'audio_corrupt_missing_file_reason', 'Incorrect specifications': 'audio_bad_specifications_reason', 'Other Issue': 'audio_other_reason'}
     my.audio_reasons_arr = ['Incorrect Audio Mapping', 'Missing Audio Channel', 'Crackle/Hiss/Pop/Static/Ticks', 'Distortion', 'Dropouts', 'Sync issue', 'Missing elements', 'Corrupt file / missing file', 'Incorrect specifications', 'Other Issue']
     my.metadata_reasons = {'Missing information': 'metadata_missing_info_reason', 'Incorrect information': 'metadata_bad_info_reason', 'Incorrect formatting': 'metadata_bad_formatting_reason', 'Other Issue': 'metadata_other_reason'}
     my.metadata_reasons_arr = ['Missing information', 'Incorrect information', 'Incorrect formatting', 'Other Issue']
     my.subtitle_reasons = {'Interlacing on subtitles': 'subtitle_interlacing_reason', 'Incorrect subtitles': 'subtitle_bad_subtitles_reason', 'Sync issue': 'subtitle_sync_issue_reason', 'Overlapping other text': 'subtitle_overlapping_reason', 'Other issue': 'subtitle_other_reason'}
     my.subtitle_reasons_arr = ['Interlacing on subtitles', 'Incorrect subtitles', 'Sync issue', 'Overlapping other text', 'Other issue']
     my.cc_reasons = {'Sync issue': 'cc_sync_issue_reason','Incorrect CC': 'cc_bad_cc_reason', 'Overlapping other text': 'cc_overlapping_reason','Other issue': 'cc_other_reason'}
     my.cc_reasons_arr = ['Sync issue','Incorrect CC', 'Overlapping other text','Other issue']
     my.rejection_causes = ['Client Error','Machine Error','Manager Error','Operator Error','Process Error','Scheduler Error']
     my.root_cause_types = ['Machine Error','Operator Error','Incorrect Instructions','Source Issue','No Issue Found']
     my.statuses = ['Open','Investigating','Waiting for Source','Needs Corrective Action','Closed']
开发者ID:Smurgledwerf,项目名称:custom,代码行数:21,代码来源:error_viewer.py

示例13: get_display

# 需要导入模块: from client.tactic_client_lib import TacticServerStub [as 别名]
# 或者: from client.tactic_client_lib.TacticServerStub import get [as 别名]
    def get_display(my):
        name = ''
        if 'code' in my.kwargs.keys():
            code = str(my.kwargs.get('code'))
            if 'name' in my.kwargs.keys():
                name = str(my.kwargs.get('name'))
        else:
            sobject = my.get_current_sobject()
            code = sobject.get_code()
            if 'WORK_ORDER' in code or 'PROJ' in code:
                name = sobject.get_value('process')
            elif 'TITLE' in code:
                name = sobject.get_value('title')
                if sobject.get_value('episode') not in [None,'']:
                    name = '%s: %s' % (name, sobject.get_value('episode'))
            elif 'ORDER' in code:
                name = sobject.get_value('name')
            if sobject.has_value('lookup_code'):
                if 'STATUS_LOG' in code:
                    my.server = TacticServerStub.get()
                    name = my.server.eval("@GET(sthpw/task['lookup_code','%s'].process)" % sobject.get_value('lookup_code')) 
                    if name:
                        name = name[0]
                    else:
                        name = 'Deleted Work Order'
                else:
                    name = sobject.get_value('process')
                code = sobject.get_value('lookup_code')

        widget = DivWdg()
        table = Table()

        table.add_row()
        cell1 = table.add_cell('<img border="0" style="vertical-align: middle" title="Inspect" name="Inspect" src="/context/icons/silk/information.png">')
        cell1.add_attr('code', code)
        cell1.add_attr('name',name)
        launch_behavior = my.get_launch_behavior()
        cell1.add_style('cursor: pointer;')
        cell1.add_behavior(launch_behavior)
        widget.add(table)

        return widget
开发者ID:2gDigitalPost,项目名称:custom,代码行数:44,代码来源:taskobjlauncher.py

示例14: init

# 需要导入模块: from client.tactic_client_lib import TacticServerStub [as 别名]
# 或者: from client.tactic_client_lib.TacticServerStub import get [as 别名]
    def init(my):
        my.server = TacticServerStub.get()
        my.types = ['HDCAM_Old', 'HDCAM_TV_FOX_Old', 'HDCAM_FILM_FOX_Old', 'HDCAM DIGIBETA_Old', 'DVD_Old', 'D5_Old']

        current_directory = os.path.dirname(__file__)
        my.template_files = {
            'HDCAM_Old': os.path.join(current_directory, 'templates/HDCAM_label_old.html'),
            'HDCAM_FILM_FOX_Old': os.path.join(current_directory, 'templates/HDCAM_FILM_FOX_label_old.html'),
            'HDCAM_TV_FOX_Old': os.path.join(current_directory, 'templates/HDCAM_TV_FOX_label_old.html'),
            'HDCAM DIGIBETA_Old': os.path.join(current_directory, 'templates/HDCAM_Digibeta_label_old.html'),
            'DVD_Old': os.path.join(current_directory, 'templates/DVD_Label_old.html'),
            'D5_Old': os.path.join(current_directory, 'templates/D5_label_old.html'),
            'HDCAM': os.path.join(current_directory, 'templates/HDCAM_label.html'),
            'HDCAM_FILM_FOX': os.path.join(current_directory, 'templates/HDCAM_FILM_FOX_label.html'),
            'HDCAM_TV_FOX': os.path.join(current_directory, 'templates/HDCAM_TV_FOX_label.html'),
            'HDCAM DIGIBETA': os.path.join(current_directory, 'templates/HDCAM_Digibeta_label.html'),
            'DVD': os.path.join(current_directory, 'templates/DVD_Label.html'),
            'D5': os.path.join(current_directory, 'templates/D5_label.html'),
            'LTO': os.path.join(current_directory, 'templates/LTO_label.html')
        }

        # This is needed to present the keys in template_files in order
        # Since the platform is using Python 2.6, Ordered dictionaries are not available by default
        my.template_file_types = ('HDCAM', 'HDCAM_FILM_FOX', 'HDCAM_TV_FOX', 'HDCAM DIGIBETA', 'DVD', 'D5', 'LTO')
开发者ID:2gDigitalPost,项目名称:custom,代码行数:26,代码来源:label_maker.py

示例15: execute

# 需要导入模块: from client.tactic_client_lib import TacticServerStub [as 别名]
# 或者: from client.tactic_client_lib.TacticServerStub import get [as 别名]
    def execute(self):

        file_path = self.kwargs.get("path")
        site = self.kwargs.get("site")
        project_code = self.kwargs.get("project_code")
        base_dir = self.kwargs.get("base_dir")
        search_type = self.kwargs.get("search_type")
        process = self.kwargs.get("process")
        watch_script_path = self.kwargs.get("script_path")
        if not process:
            process = "publish"

        basename = os.path.basename(file_path)

        context = self.kwargs.get("context")
        if not context:
            context = '%s/%s'  % (process, basename)


        # find the relative_dir and relative_path
        relative_path = file_path.replace("%s/" % base_dir, "")
        relative_dir = os.path.dirname(relative_path)

        file_name = os.path.basename(file_path)
        log_path = '%s/TACTIC_log.txt' %(base_dir)
        self.create_checkin_log()

        # Define asset type of the file
        asset_type = self.get_asset_type(file_path)
        description = "drop folder check-in of %s" %file_name

        from client.tactic_client_lib import TacticServerStub
        server = TacticServerStub.get(protocol='local')
        server.set_project(project_code)

        transaction = Transaction.get(create=True)
        server.start(title='Check-in of media', description='Check-in of media')

        server_return_value = {}

        try:
            filters = [
                    [ 'name', '=', file_name ],
                    #[ 'relative_dir', '=', relative_dir ]
                ]
            sobj = server.query(search_type, filters=filters, single=True)

            if not sobj:
                # create sobject if it does not yet exist
                sobj = SearchType.create(search_type)
                if SearchType.column_exists(search_type, "name"):
                    sobj.set_value("name", basename)
                if SearchType.column_exists(search_type, "media_type"):
                    sobj.set_value("media_type", asset_type)


                if SearchType.column_exists(search_type, "relative_dir"):
                    sobj.set_value("relative_dir", relative_dir)

                if SearchType.column_exists(search_type, "keywords"):
                    relative_path = relative_path
                    keywords = Common.extract_keywords_from_path(relative_path)
                    keywords = " ".join( keywords )
                    sobj.set_value("keywords", keywords)

                sobj.commit()
                search_key = sobj.get_search_key()
            else:
                search_key = sobj.get("__search_key__")


            #task = server.create_task(sobj.get('__search_key__'),process='publish')
            #server.update(task, {'status': 'New'})
            
            """
            #TEST: simulate different check-in duration
            from random import randint
            sec = randint(1, 5)
            print "checking in for ", sec, "sec"
            server.eval("@SOBJECT(sthpw/login)")
            import shutil
            dir_name,base_name = os.path.split(file_path)
            dest_dir = 'C:/ProgramData/Southpaw/watch_temp'
            if not os.path.exists(dest_dir):
                os.makedirs(dest_dir)
            shutil.move(file_path, '%s/%s'%(dest_dir, base_name))
            time.sleep(sec)
            # move back the file in a few seconds 
            shutil.move('%s/%s'%(dest_dir, base_name), file_path)
            """
            server_return_value = server.simple_checkin(search_key,  context, file_path, description=description, mode='move')

            if watch_script_path:
                cmd = PythonCmd(script_path=watch_script_path,search_type=search_type,drop_path=file_path,search_key=search_key)
                cmd.execute()



            
        except Exception as e:
#.........这里部分代码省略.........
开发者ID:mincau,项目名称:TACTIC,代码行数:103,代码来源:watch_drop_folder.py


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