66import celery .utils
77
88from geospaas_harvesting .cli import refresh_vocabularies , retry_ingest
9- from geospaas_harvesting .config import ProvidersConfiguration , SearchConfiguration
9+ import geospaas_harvesting .config as harvesting_config
1010
1111from geospaas_processing .tasks import FaultTolerantTask
1212from . import app
2121@app .task (base = FaultTolerantTask , bind = True , track_started = True )
2222def start_harvest (self , search_config_dict ):
2323 """Launch harvesting according to the search configuration"""
24- config = ProvidersConfiguration .from_file (HARVEST_CONFIG_PATH )
25- search_config = SearchConfiguration .from_dict (search_config_dict ) \
26- .with_providers (config .providers ) # pylint: disable=no-member
24+ search_config = harvesting_config .SearchConfiguration .from_dict (search_config_dict )
2725 searches = search_config .create_provider_searches ()
2826 logger .info ("Running the following searches: %s" , searches )
2927 tasks_to_run = celery .group (
@@ -44,7 +42,7 @@ def save_search_results(self, search_results):
4442@app .task (base = FaultTolerantTask , bind = True , track_started = True )
4543def update_vocabularies (self ):
4644 """Update vocabularies in the GeoSPaaS database"""
47- config = ProvidersConfiguration .from_file (HARVEST_CONFIG_PATH )
45+ config = harvesting_config . GeneralConfiguration .from_file (HARVEST_CONFIG_PATH )
4846 refresh_vocabularies (config )
4947
5048
0 commit comments