Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove duplicated/unused 'get_manager' function #1915

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 1 addition & 32 deletions pygeoapi/process/manager/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,35 +29,4 @@
#
# =================================================================

import logging
from typing import Dict

from pygeoapi.plugin import load_plugin
from pygeoapi.process.manager.base import BaseManager

LOGGER = logging.getLogger(__name__)


def get_manager(config: Dict) -> BaseManager:
"""Instantiate process manager from the supplied configuration.

:param config: pygeoapi configuration

:returns: The pygeoapi process manager object
"""
manager_conf = config.get('server', {}).get(
'manager',
{
'name': 'Dummy',
'connection': None,
'output_dir': None
}
)
processes_conf = {}
for id_, resource_conf in config.get('resources', {}).items():
if resource_conf.get('type') == 'process':
processes_conf[id_] = resource_conf
manager_conf['processes'] = processes_conf
if manager_conf.get('name') == 'Dummy':
LOGGER.info('Starting dummy manager')
return load_plugin('process_manager', manager_conf)
"""OGC process manager package"""