本文整理汇总了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()