def start_pollers(configs):
"""start_pollers starts a set of pollers for specified configurations.
Args:
configs: Configurations for the pollers.
Returns:
Array of poller info (process, comm pipe).
"""
pollers = []
for config in configs:
parent_pipe, child_pipe = Pipe()
p = Process(target=poll_scm, args=(config, child_pipe,))
pollers.append(PollerInfo(
process=p,
pipe=parent_pipe))
l.info('Starting poller for {}.'.format(config.name))
p.start()
return pollers
评论列表
文章目录