def record_statistics(self):
    if ((time.time() - self.last_stats) > settings.JOB_EVENT_STATISTICS_INTERVAL):
        try:
            self.redis.set(f'awx_callback_receiver_statistics_{self.pid}', self.debug())
            self.last_stats = time.time()
        except Exception:
            logger.exception('encountered an error communicating with redis')
            self.last_stats = time.time()
def record_statistics(self):
    if ((time.time() - self.last_stats) > settings.JOB_EVENT_STATISTICS_INTERVAL):
        try:
            self.redis.set(f'awx_callback_receiver_statistics_{self.pid}', self.debug())
            self.last_stats = time.time()
        except Exception:
            logger.exception('encountered an error communicating with redis')
            self.last_stats = time.time()