async def init(self) -> None:
self.stats = await self.insert(self.stats)<EOL>self.configuration = await self.insert(self.configuration)<EOL>if not self.executor:<EOL><INDENT>try:<EOL><INDENT>max_workers = self.config.get('<STR_LIT>')<EOL><DEDENT>except Exception:<EOL><INDENT>max_workers = None<EOL><DEDENT>self.executor = ThreadPoolExecutor(max_workers=max_workers)<EOL><DEDENT>for task in self.initial_tasks:<EOL><INDENT>await self.insert(task)<EOL><DEDENT>self.monitor = asyncio.ensure_future(self.monitor_tasks())<EOL>self.counters['<STR_LIT>'] = time.time()<EOL>
Initialize configuration and start tasks.