本文整理汇总了Python中sabnzbd.halt函数的典型用法代码示例。如果您正苦于以下问题:Python halt函数的具体用法?Python halt怎么用?Python halt使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了halt函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: exit
def exit(self, **kwargs):
""" Stop SABnzbd """
yield "Initiating shutdown..."
sabnzbd.halt()
yield "<br>SABnzbd-%s shutdown finished" % sabnzbd.__version__
cherrypy.engine.exit()
sabnzbd.SABSTOP = True
示例2: defhost
def defhost(self, icon):
sabnzbd.cfg.cherryhost.set('127.0.0.1')
sabnzbd.cfg.enable_https.set(False)
sabnzbd.config.save_config()
self.hover_text = T('Restart')
sabnzbd.halt()
cherrypy.engine.restart()
示例3: nologin
def nologin(self, icon):
sabnzbd.cfg.username.set('')
sabnzbd.cfg.password.set('')
sabnzbd.config.save_config()
self.hover_text = T('Restart')
sabnzbd.halt()
cherrypy.engine.restart()
示例4: restartNoLogin_
def restartNoLogin_(self, sender):
sabnzbd.cfg.username.set('')
sabnzbd.cfg.password.set('')
sabnzbd.config.save_config()
self.setMenuTitle("\n\n%s\n"% (T('Stopping...')))
sabnzbd.halt()
cherrypy.engine.restart()
self.setMenuTitle("\n\n%s\n"% (T('Stopping...')))
示例5: restartSafeHost_
def restartSafeHost_(self, sender):
sabnzbd.cfg.cherryhost.set('127.0.0.1')
sabnzbd.cfg.cherryport.set('8080')
sabnzbd.cfg.https_port.set('8090')
sabnzbd.cfg.enable_https.set(False)
sabnzbd.config.save_config()
self.setMenuTitle("\n\n%s\n"% (T('Stopping...')))
sabnzbd.halt()
cherrypy.engine.restart()
self.setMenuTitle("\n\n%s\n"% (T('Stopping...')))
示例6: applicationShouldTerminate_
def applicationShouldTerminate_(self, sender):
logging.info('[osx] application terminating')
self.setMenuTitle("\n\n%s\n"% (T('Stopping...')))
self.status_item.setHighlightMode_(NO)
sabnzbd.OSX_ICON = 0
logging.info('[osx] application stopping daemon')
sabnzbd.halt()
cherrypy.engine.exit()
sabnzbd.SABSTOP = True
osx.sendGrowlMsg('SABnzbd',T('SABnzbd shutdown finished'),osx.NOTIFICATION['other'])
logging.info('Leaving SABnzbd')
sys.stderr.flush()
sys.stdout.flush()
return NSTerminateNow
示例7: applicationShouldTerminate_
def applicationShouldTerminate_(self, sender):
logging.info('[osx] application terminating')
self.setMenuTitle("\n\n%s\n"% (T('Stopping...')))
self.status_item.setHighlightMode_(NO)
self.osx_icon = False
logging.info('[osx] application stopping daemon')
sabnzbd.halt()
cherrypy.engine.exit()
sabnzbd.SABSTOP = True
try:
growler.send_notification('SABnzbd', T('SABnzbd shutdown finished'), growler.NOTIFICATION['other'])
except AttributeError:
# Fails for the OSX binary
pass
logging.info('Leaving SABnzbd')
sys.stderr.flush()
sys.stdout.flush()
return NSTerminateNow
示例8: restartAction_
def restartAction_(self, sender):
self.setMenuTitle("\n\n%s\n"% (T('Stopping...')))
sabnzbd.halt()
cherrypy.engine.restart()
self.setMenuTitle("\n\n%s\n"% (T('Stopping...')))
示例9: shutdown
def shutdown(self, icon):
self.hover_text = T('Shutdown')
sabnzbd.halt()
cherrypy.engine.exit()
sabnzbd.SABSTOP = True
示例10: restart
def restart(self, icon):
self.hover_text = T('Restart')
sabnzbd.halt()
cherrypy.engine.restart()
示例11: shutdown
def shutdown(self, icon):
self.hover_text = self.txt_shutdown
logging.info('Shutdown requested by tray')
sabnzbd.halt()
cherrypy.engine.exit()
sabnzbd.SABSTOP = True
示例12: restart
def restart(self, icon):
self.hover_text = self.txt_restart
sabnzbd.halt()
cherrypy.engine.restart()