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


Python Snapshot.add_integral_trigger方法代码示例

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


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

示例1: execute

# 需要导入模块: from pyasm.biz import Snapshot [as 别名]
# 或者: from pyasm.biz.Snapshot import add_integral_trigger [as 别名]
    def execute(my):
        event = "change|config/widget_config"
        trigger = SearchType.create("sthpw/trigger")
        trigger.set_value("event", event)
        trigger.set_value("class_name", "pyasm.web.web_init.SidebarTrigger")
        trigger.set_value("mode", "same process,same transaction")
        Trigger.append_static_trigger(trigger, startup=True)

        event = "change|sthpw/schema"
        trigger = SearchType.create("sthpw/trigger")
        trigger.set_value("event", event)
        trigger.set_value("class_name", "pyasm.web.web_init.SidebarTrigger")
        trigger.set_value("mode", "same process,same transaction")
        Trigger.append_static_trigger(trigger, startup=True)

        # when the palette column of the project changes
        event = "change|sthpw/project|palette"
        trigger = SearchType.create("sthpw/trigger")
        trigger.set_value("event", event)
        trigger.set_value("class_name", "pyasm.web.web_init.SidebarTrigger")
        trigger.set_value("mode", "same process,same transaction")
        Trigger.append_static_trigger(trigger, startup=True)


        # when the palette column of the project changes
        event = "change|sthpw/pref_setting"
        trigger = SearchType.create("sthpw/trigger")
        trigger.set_value("event", event)
        trigger.set_value("class_name", "pyasm.web.web_init.SidebarTrigger")
        trigger.set_value("mode", "same process,same transaction")
        Trigger.append_static_trigger(trigger, startup=True)




        
        event = "change|sthpw/login_in_group"
        trigger = SearchType.create("sthpw/trigger")
        trigger.set_value("event", event)
        trigger.set_value("class_name", "pyasm.web.web_init.SidebarTrigger")
        trigger.set_value("mode", "same process,same transaction")
        Trigger.append_static_trigger(trigger, startup=True)


        event = "change|sthpw/login_group"
        trigger = SearchType.create("sthpw/trigger")
        trigger.set_value("event", event)
        trigger.set_value("class_name", "pyasm.web.web_init.SidebarTrigger")
        trigger.set_value("mode", "same process,same transaction")
        
        Trigger.append_static_trigger(trigger, startup=True)



        # FIXME: should this really be a web_init trigger.  This needs
        # to be run even from batch commands
        event = "change|sthpw/task|status"
        trigger = SearchType.create("sthpw/trigger")
        trigger.set_value("event", event)
        trigger.set_value("class_name", "pyasm.web.web_init.StatusLogTrigger")
        trigger.set_value("mode", "same process,same transaction")
        Trigger.append_static_trigger(trigger, startup=True)

        event = "insert|sthpw/login"
        trigger = SearchType.create("sthpw/trigger")
        trigger.set_value("event", event)
        trigger.set_value("class_name", "pyasm.web.web_init.DisplayNameTrigger")
        trigger.set_value("mode", "same process,same transaction")
        Trigger.append_static_trigger(trigger, startup=True)



        #from tactic.command.queue import JobTask
        #JobTask.start()


        from pyasm.biz import Snapshot
        Snapshot.add_integral_trigger()
开发者ID:blezek,项目名称:TACTIC,代码行数:80,代码来源:web_init.py


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