diff --git a/swh/indexer/cli.py b/swh/indexer/cli.py --- a/swh/indexer/cli.py +++ b/swh/indexer/cli.py @@ -205,7 +205,7 @@ origins = list_origins_by_producer(idx_storage, mappings, tool_ids) - kwargs = {"policy_update": "update-dups"} + kwargs = {"policy_update": "update-dups", "retries_left": 1} schedule_origin_batches(scheduler, task_type, origins, origin_batch_size, kwargs) diff --git a/swh/indexer/journal_client.py b/swh/indexer/journal_client.py --- a/swh/indexer/journal_client.py +++ b/swh/indexer/journal_client.py @@ -1,4 +1,4 @@ -# 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 # License: GNU General Public License version 3, or any later version # See top-level LICENSE file for more information @@ -37,6 +37,7 @@ "oneshot", visit_urls, policy_update="update-dups", + retries_left=1, ) ) diff --git a/swh/indexer/tests/test_journal_client.py b/swh/indexer/tests/test_journal_client.py --- a/swh/indexer/tests/test_journal_client.py +++ b/swh/indexer/tests/test_journal_client.py @@ -36,6 +36,7 @@ }, "policy": "oneshot", "type": "task-name", + "retries_left": 1, }, ], ), @@ -69,6 +70,7 @@ }, "policy": "oneshot", "type": "task-name", + "retries_left": 1, }, ], ), @@ -103,6 +105,7 @@ }, "policy": "oneshot", "type": "task-name", + "retries_left": 1, }, ], ), @@ -140,6 +143,7 @@ }, "policy": "oneshot", "type": "task-name", + "retries_left": 1, }, { "arguments": { @@ -148,6 +152,7 @@ }, "policy": "oneshot", "type": "task-name", + "retries_left": 1, }, ], ),