本文整理匯總了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)