Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arkindex
Backend
Commits
04f55f47
Commit
04f55f47
authored
2 years ago
by
ml bonhomme
Committed by
Erwan Rouchet
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add retries to corpus_delete
parent
64d025ad
No related branches found
No related tags found
1 merge request
!1775
Add retries to corpus_delete
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
arkindex/documents/tasks.py
+2
-2
2 additions, 2 deletions
arkindex/documents/tasks.py
with
2 additions
and
2 deletions
arkindex/documents/tasks.py
+
2
−
2
View file @
04f55f47
...
...
@@ -5,7 +5,7 @@ from uuid import UUID
from
django.conf
import
settings
from
django.db.models
import
Q
from
django_rq
import
job
from
rq
import
get_current_job
from
rq
import
Retry
,
get_current_job
from
arkindex.dataimport.models
import
DataImport
,
DataImportElement
,
WorkerActivity
,
WorkerRun
from
arkindex.documents.managers
import
ElementQuerySet
...
...
@@ -24,7 +24,7 @@ from arkindex.documents.models import (
logger
=
logging
.
getLogger
(
__name__
)
@job
(
'
high
'
,
timeout
=
settings
.
RQ_TIMEOUTS
[
'
corpus_delete
'
])
@job
(
'
high
'
,
timeout
=
settings
.
RQ_TIMEOUTS
[
'
corpus_delete
'
]
,
retry
=
Retry
(
max
=
3
)
)
def
corpus_delete
(
corpus_id
:
str
)
->
None
:
# Note that this can be None when the task is run outside of a RQ worker (e.g. unit test)
rq_job
=
get_current_job
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment