本文整理汇总了Python中sickbeard.get_backlog_cycle_time函数的典型用法代码示例。如果您正苦于以下问题:Python get_backlog_cycle_time函数的具体用法?Python get_backlog_cycle_time怎么用?Python get_backlog_cycle_time使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_backlog_cycle_time函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: change_BACKLOG_FREQUENCY
def change_BACKLOG_FREQUENCY(freq):
"""
Change frequency of backlog thread
:param freq: New frequency
"""
sickbeard.BACKLOG_FREQUENCY = to_int(freq, default=sickbeard.DEFAULT_BACKLOG_FREQUENCY)
sickbeard.MIN_BACKLOG_FREQUENCY = sickbeard.get_backlog_cycle_time()
if sickbeard.BACKLOG_FREQUENCY < sickbeard.MIN_BACKLOG_FREQUENCY:
sickbeard.BACKLOG_FREQUENCY = sickbeard.MIN_BACKLOG_FREQUENCY
sickbeard.backlogSearchScheduler.cycleTime = datetime.timedelta(minutes=sickbeard.BACKLOG_FREQUENCY)
示例2: change_SEARCH_FREQUENCY
def change_SEARCH_FREQUENCY(freq):
if freq == None:
freq = sickbeard.DEFAULT_SEARCH_FREQUENCY
else:
freq = int(freq)
if freq < sickbeard.MIN_SEARCH_FREQUENCY:
freq = sickbeard.MIN_SEARCH_FREQUENCY
sickbeard.SEARCH_FREQUENCY = freq
sickbeard.currentSearchScheduler.cycleTime = datetime.timedelta(minutes=sickbeard.SEARCH_FREQUENCY)
sickbeard.backlogSearchScheduler.cycleTime = datetime.timedelta(minutes=sickbeard.get_backlog_cycle_time())