Skip to content

Commit ab0ac64

Browse files
committed
update harvesting tasks
1 parent 2917e1a commit ab0ac64

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

geospaas_processing/tasks/harvesting.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import celery.utils
77

88
from 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

1111
from geospaas_processing.tasks import FaultTolerantTask
1212
from . import app
@@ -21,9 +21,7 @@
2121
@app.task(base=FaultTolerantTask, bind=True, track_started=True)
2222
def 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)
4543
def 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

Comments
 (0)