Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
ldv_datamanagement_tasks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
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
LDV
ldv_datamanagement_tasks
Commits
3cefa993
Commit
3cefa993
authored
2 years ago
by
Mattia Mancini
Browse files
Options
Downloads
Patches
Plain Diff
Add debug info
parent
3de521ed
No related branches found
No related tags found
1 merge request
!10
Implement pruning mechanism for the utils script
Pipeline
#39311
passed with warnings
2 years ago
Stage: lint
Stage: test
Stage: package
Stage: integration
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
atdb/prune.py
+6
-3
6 additions, 3 deletions
atdb/prune.py
with
6 additions
and
3 deletions
atdb/prune.py
+
6
−
3
View file @
3cefa993
...
@@ -30,7 +30,7 @@ def extract_surls_from_obj(
...
@@ -30,7 +30,7 @@ def extract_surls_from_obj(
for
value
in
obj
:
for
value
in
obj
:
extract_surls_from_obj
(
value
,
partial
=
partial
)
extract_surls_from_obj
(
value
,
partial
=
partial
)
except
KeyError
as
exception
:
except
KeyError
as
exception
:
logg
ing
.
exception
(
exception
)
logg
er
.
exception
(
exception
)
return
partial
return
partial
...
@@ -51,10 +51,13 @@ def remove_surl_locations(surls: List[str], dry_run=False) -> None:
...
@@ -51,10 +51,13 @@ def remove_surl_locations(surls: List[str], dry_run=False) -> None:
for
surl
in
surls
:
for
surl
in
surls
:
if
not
dry_run
:
if
not
dry_run
:
logging
.
debug
(
"
removing file: %s
"
,
context
.
stat
(
surl
))
logger
.
debug
(
"
removing surl %s
"
,
surl
)
logger
.
debug
(
"
file stats are:
"
,
context
.
stat
(
surl
))
context
.
release
(
surl
)
context
.
release
(
surl
)
else
:
else
:
logging
.
info
(
"
removing file: %s
"
,
context
.
stat
(
surl
))
logger
.
info
(
"
[dry-run] removing surl %s
"
,
surl
)
logger
.
info
(
"
file stats are: %s
"
,
context
.
stat
(
surl
))
def
prune
(
args
):
def
prune
(
args
):
...
...
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