Example #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)
Example #2
0
 def test_sync(self):
     logging.basicConfig(level=logging.DEBUG)
     synclb()