def set_recursion_limit(self):
        """Set explicit recursion limit if set in the environment.

        This is set here to make sure we're setting it always
        when we initialize Django, also when we're loading celery (which
        is calling django.setup too).

        This is only being used for the amo-validator so initializing this late
        should be fine.
        """
        if 'RECURSION_LIMIT' in os.environ:
            try:
                limit = int(os.environ['RECURSION_LIMIT'])
            except __HOLE__:
                log.warning('Unable to parse RECURSION_LIMIT "{}"'.format(
                    os.environ['RECURSION_LIMIT']))
            else:
                sys.setrecursionlimit(limit)
                log.info('Set RECURSION_LIMIT to {}'.format(limit))
dataset/ETHPy150Open mozilla/addons-server/src/olympia/core/apps.py/CoreConfig.set_recursion_limit