Changeset View
Changeset View
Standalone View
Standalone View
swh/indexer/journal_client.py
# Copyright (C) 2018 The Software Heritage developers | # Copyright (C) 2018-2020 The Software Heritage developers | ||||
# See the AUTHORS file at the top-level directory of this distribution | # See the AUTHORS file at the top-level directory of this distribution | ||||
# License: GNU General Public License version 3, or any later version | # License: GNU General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
import logging | import logging | ||||
from swh.core.utils import grouper | from swh.core.utils import grouper | ||||
from swh.scheduler.utils import create_task_dict | from swh.scheduler.utils import create_task_dict | ||||
Show All 22 Lines | if task_names.get("origin_metadata"): | ||||
else: | else: | ||||
visit_urls.append(visit["origin"]["url"]) | visit_urls.append(visit["origin"]["url"]) | ||||
task_dicts.append( | task_dicts.append( | ||||
create_task_dict( | create_task_dict( | ||||
task_names["origin_metadata"], | task_names["origin_metadata"], | ||||
"oneshot", | "oneshot", | ||||
visit_urls, | visit_urls, | ||||
policy_update="update-dups", | policy_update="update-dups", | ||||
retries_left=1, | |||||
) | ) | ||||
) | ) | ||||
if task_dicts: | if task_dicts: | ||||
scheduler.create_tasks(task_dicts) | scheduler.create_tasks(task_dicts) |