How to use the cryptostore.config.DynamicConfig function in cryptostore

To help you get started, we’ve selected a few cryptostore examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bmoscon / cryptostore / cryptostore / cryptostore.py View on Github external
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()
github bmoscon / cryptostore / cryptostore / aggregator / aggregator.py View on Github external
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)