コード例 #1
0
    def handle(self, *args, **options):

        while True:
            logger.debug("[loadbalancer_sync] starting loop ...")

            try:
                synclb()
            except Exception as er:
                logger.error("[loadbalancer_sync] ERROR caught at daemon loop level: %s" % er)

            logger.debug("[loadbalancer_sync] going to sleep for %ss" % settings.ACTION_WORKER_SLEEP_SECS)
            time.sleep(settings.ACTION_WORKER_SLEEP_SECS)
コード例 #2
0
ファイル: tests.py プロジェクト: jnovinger/monscale
 def test_sync(self):
     logging.basicConfig(level=logging.DEBUG)
     synclb()