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
e128bf2d
Commit
e128bf2d
authored
2 years ago
by
Mattia Mancini
Browse files
Options
Downloads
Patches
Plain Diff
Using bulk method
parent
aeaa49d7
No related branches found
No related tags found
1 merge request
!10
Implement pruning mechanism for the utils script
Pipeline
#39332
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
+4
-8
4 additions, 8 deletions
atdb/prune.py
with
4 additions
and
8 deletions
atdb/prune.py
+
4
−
8
View file @
e128bf2d
...
...
@@ -48,14 +48,10 @@ def remove_surl_locations(surls: List[str], dry_run=False) -> None:
Removes SURL location if dry_run is specified it only tests
"""
context
=
gfal2
.
creat_context
()
for
surl
in
surls
:
if
not
dry_run
:
logger
.
debug
(
"
removing surl %s
"
,
surl
)
logger
.
debug
(
"
file stats are: %s
"
,
context
.
stat
(
surl
))
context
.
unlink
(
surl
)
context
.
unlink
(
surls
)
else
:
for
surl
in
surls
:
logger
.
info
(
"
[dry-run] removing surl %s
"
,
surl
)
logger
.
info
(
"
file stats are: %s
"
,
context
.
stat
(
surl
))
...
...
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