本文整理汇总了Python中ubuntui.ev.EventLoop.remove_alarm方法的典型用法代码示例。如果您正苦于以下问题:Python EventLoop.remove_alarm方法的具体用法?Python EventLoop.remove_alarm怎么用?Python EventLoop.remove_alarm使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ubuntui.ev.EventLoop
的用法示例。
在下文中一共展示了EventLoop.remove_alarm方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: do_commit
# 需要导入模块: from ubuntui.ev import EventLoop [as 别名]
# 或者: from ubuntui.ev.EventLoop import remove_alarm [as 别名]
def do_commit(self, sender):
"""Commit changes to shadow assignments, constraints, and pins"""
app.metadata_controller.bundle.machines = self._machines
self.controller.clear_assignments(self.application)
for juju_machine_id, al in self.shadow_assignments.items():
for application, atype in al:
assert application == self.application
self.controller.add_assignment(self.application,
juju_machine_id, atype)
for j_m_id, m in self.shadow_pins.items():
self.controller.set_machine_pin(j_m_id, m)
self.controller.handle_sub_view_done()
if self.alarm:
EventLoop.remove_alarm(self.alarm)
示例2: finish
# 需要导入模块: from ubuntui.ev import EventLoop [as 别名]
# 或者: from ubuntui.ev.EventLoop import remove_alarm [as 别名]
def finish(self, *args):
if self.alarm_handle:
EventLoop.remove_alarm(self.alarm_handle)
return controllers.use('deploystatus').render()
示例3: enqueue_search
# 需要导入模块: from ubuntui.ev import EventLoop [as 别名]
# 或者: from ubuntui.ev.EventLoop import remove_alarm [as 别名]
def enqueue_search(self):
if self.search_delay_alarm:
EventLoop.remove_alarm(self.search_delay_alarm)
self.search_delay_alarm = EventLoop.set_alarm_in(0.5,
self.really_search)
示例4: do_cancel
# 需要导入模块: from ubuntui.ev import EventLoop [as 别名]
# 或者: from ubuntui.ev.EventLoop import remove_alarm [as 别名]
def do_cancel(self, sender):
self.controller.handle_sub_view_done()
if self.alarm:
EventLoop.remove_alarm(self.alarm)