def handle(self, conf):
if type(self).strategy == StartupBot.strategy:
yield _StartupBot.handle(self, conf)
return
import warnings
warnings.warn(
"Implementing custom startup bot relaunch strategies by implementing " +
"strategy() has been deprecated.",
DeprecationWarning
)
for value in self.strategy(conf):
if isinstance(value, numbers.Real):
yield idiokit.sleep(value)
else:
yield self.launch(value)
评论列表
文章目录