Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
Base Worker
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Workers
Base Worker
Commits
fcae8235
Commit
fcae8235
authored
1 year ago
by
Eva Bardou
Committed by
Eva Bardou
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Nits
parent
7df975fc
No related branches found
No related tags found
1 merge request
!486
Deprecate `worker_version` usage and support `worker_run` where it was missing
Pipeline
#154745
passed
1 year ago
Stage: test
Stage: build
Stage: release
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
arkindex_worker/worker/transcription.py
+18
-8
18 additions, 8 deletions
arkindex_worker/worker/transcription.py
with
18 additions
and
8 deletions
arkindex_worker/worker/transcription.py
+
18
−
8
View file @
fcae8235
...
...
@@ -450,17 +450,27 @@ class TranscriptionMixin:
if
worker_version
is
not
None
:
# If worker_version=False, filter by manual worker_version e.g. None
worker_version_id
=
worker_version
if
worker_version
else
None
transcriptions
=
transcriptions
.
where
(
CachedTranscription
.
worker_version_id
==
worker_version_id
)
worker_version_id
=
worker_version
or
None
if
worker_version_id
:
transcriptions
=
transcriptions
.
where
(
CachedTranscription
.
worker_version_id
==
worker_version_id
)
else
:
transcriptions
=
transcriptions
.
where
(
CachedTranscription
.
worker_version_id
.
is_null
()
)
if
worker_run
is
not
None
:
# If worker_run=False, filter by manual worker_run e.g. None
worker_run_id
=
worker_run
if
worker_run
else
None
transcriptions
=
transcriptions
.
where
(
CachedTranscription
.
worker_run_id
==
worker_run_id
)
worker_run_id
=
worker_run
or
None
if
worker_run_id
:
transcriptions
=
transcriptions
.
where
(
CachedTranscription
.
worker_run_id
==
worker_run_id
)
else
:
transcriptions
=
transcriptions
.
where
(
CachedTranscription
.
worker_run_id
.
is_null
()
)
else
:
transcriptions
=
self
.
api_client
.
paginate
(
"
ListTranscriptions
"
,
id
=
element
.
id
,
**
query_params
...
...
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