def discover_engines(self, executor=None):
        """Discover configured engines.

        :param executor: Optional executor module override
        """
        if executor is None:
            executor = getattr(settings, 'FLOW_EXECUTOR', {}).get('NAME', 'resolwe.flow.executors.local')
        self.executor = self.load_executor(executor)
        logger.info(
            __("Loaded '{}' executor.", str(self.executor.__class__.__module__).replace('.prepare', ''))
        )

        expression_engines = getattr(settings, 'FLOW_EXPRESSION_ENGINES', ['resolwe.flow.expression_engines.jinja'])
        self.expression_engines = self.load_expression_engines(expression_engines)
        logger.info(__(
            "Found {} expression engines: {}", len(self.expression_engines), ', '.join(self.expression_engines.keys())
        ))

        execution_engines = getattr(settings, 'FLOW_EXECUTION_ENGINES', ['resolwe.flow.execution_engines.bash'])
        self.execution_engines = self.load_execution_engines(execution_engines)
        logger.info(__(
            "Found {} execution engines: {}", len(self.execution_engines), ', '.join(self.execution_engines.keys())
        ))
Discover configured engines.

        :param executor: Optional executor module override