def check_celery_backend(self):
        """Checks if Celery backend is running and configured properly."""

        print "Checking Celery Backend......",
        if 'celery worker' not in commands.getoutput('ps -ef'):
            self._set_status(0, "[%s]Error: celery is not running" % self.NAME)
            return True

        if not os.path.exists('/etc/compass/celeryconfig'):
            self._set_status(
                0,
                "[%s]Error: No celery config file found for Compass"
                % self.NAME)
            return True

        try:
            insp = inspect()
            celery_stats = inspect.stats(insp)
            if not celery_stats:
                self._set_status(
                    0,
                    "[%s]Error: No running Celery workers were found."
                    % self.NAME)
        except IOError as error:
            self._set_status(
                0,
                "[%s]Error: Failed to connect to the backend: %s"
                % (self.NAME, str(error)))
            from errno import errorcode
            if (
                len(error.args) > 0 and
                errorcode.get(error.args[0]) == 'ECONNREFUSED'
            ):
                self.messages.append(
                    "[%s]Error: RabbitMQ server isn't running"
                    % self.NAME)
        return True
dataset/ETHPy150Open openstack/compass-core/compass/actions/health_check/check_celery.py/CeleryCheck.check_celery_backend/original