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
f904431e
Verified
Commit
f904431e
authored
3 years ago
by
Erwan Rouchet
Browse files
Options
Downloads
Patches
Plain Diff
Restore get_worker_version_slug
parent
99194803
No related branches found
No related tags found
1 merge request
!72
Drop DataSource handling
Pipeline
#78395
passed
3 years ago
Stage: test
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
arkindex_worker/worker/version.py
+8
-2
8 additions, 2 deletions
arkindex_worker/worker/version.py
with
8 additions
and
2 deletions
arkindex_worker/worker/version.py
+
8
−
2
View file @
f904431e
...
...
@@ -14,6 +14,13 @@ class WorkerVersionMixin(object):
return
worker_version
def
get_worker_version_slug
(
self
,
worker_version_id
:
str
)
->
str
:
"""
Get worker version slug from cache if possible, otherwise make API request
"""
worker_version
=
self
.
get_worker_version
(
worker_version_id
)
return
worker_version
[
"
worker
"
][
"
slug
"
]
def
get_ml_result_slug
(
self
,
ml_result
)
->
str
:
"""
Helper function to get the worker slug from element, classification or transcription.
...
...
@@ -36,5 +43,4 @@ class WorkerVersionMixin(object):
if
worker_version_id
is
None
:
return
worker_version
=
self
.
get_worker_version
(
worker_version_id
)
return
worker_version
[
"
worker
"
][
"
slug
"
]
return
self
.
get_worker_version_slug
(
worker_version_id
)
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