Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def run(self):
LOG.info("Starting cryptostore")
LOG.info("Cryptostore running on PID %d", os.getpid())
self.spawner.start()
LOG.info("Spawner started")
self.aggregator = Aggregator(config_file=self.cfg_path)
self.aggregator.start()
LOG.info("Aggregator started")
loop = asyncio.get_event_loop()
self.config = DynamicConfig(file_name=self.cfg_path, callback=self._reconfigure)
LOG.info("Cryptostore started")
loop.run_forever()
def run(self):
LOG.info("Aggregator running on PID %d", os.getpid())
loop = asyncio.get_event_loop()
self.config = DynamicConfig(file_name=self.config_file)
loop.create_task(self.loop())
try:
loop.run_forever()
except KeyboardInterrupt:
pass
except Exception:
LOG.error("Aggregator running on PID %d died due to exception", os.getpid(), exc_info=True)