Skip to content

Commit

Permalink
added retry on failure for source mappings index task
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Apr 1, 2022
1 parent 58fe607 commit b1c4851
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/common/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,10 @@ def index_source_concepts(source_id):
source.batch_index(source.concepts, ConceptDocument)


@app.task
@app.task(
ignore_result=True, autoretry_for=(Exception, WorkerLostError, ), retry_kwargs={'max_retries': 2, 'countdown': 2},
acks_late=True, reject_on_worker_lost=True
)
def index_source_mappings(source_id):
from core.sources.models import Source
source = Source.objects.filter(id=source_id).first()
Expand Down

0 comments on commit b1c4851

Please sign in to comment.