Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vospace-transfer-service
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VOSpace INAF
vospace-transfer-service
Commits
704447e1
Commit
704447e1
authored
Jan 13, 2022
by
Cristiano Urban
Browse files
Options
Downloads
Patches
Plain Diff
Minor fix.
Signed-off-by:
Cristiano Urban
<
cristiano.urban@inaf.it
>
parent
c957a5b1
No related branches found
No related tags found
No related merge requests found
Pipeline
#8906
passed
Jan 13, 2022
Stage: dockerize
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
transfer_service/file_cleaner.py
+4
-3
4 additions, 3 deletions
transfer_service/file_cleaner.py
with
4 additions
and
3 deletions
transfer_service/file_cleaner.py
+
4
−
3
View file @
704447e1
...
@@ -74,6 +74,7 @@ class FileCleaner(object):
...
@@ -74,6 +74,7 @@ class FileCleaner(object):
nodeId
=
row
[
"
node_id
"
]
nodeId
=
row
[
"
node_id
"
]
delta
=
cTime
-
dTime
delta
=
cTime
-
dTime
if
delta
.
days
>=
self
.
days
and
delta
.
seconds
>
self
.
seconds
:
if
delta
.
days
>=
self
.
days
and
delta
.
seconds
>
self
.
seconds
:
if
os
.
path
.
exists
(
filePath
):
os
.
remove
(
filePath
)
os
.
remove
(
filePath
)
self
.
logger
.
debug
(
datetime
.
datetime
.
now
().
strftime
(
"
%Y-%m-%d %H:%M:%S
"
)
+
'
'
+
filePath
)
self
.
logger
.
debug
(
datetime
.
datetime
.
now
().
strftime
(
"
%Y-%m-%d %H:%M:%S
"
)
+
'
'
+
filePath
)
try
:
try
:
...
@@ -81,7 +82,7 @@ class FileCleaner(object):
...
@@ -81,7 +82,7 @@ class FileCleaner(object):
except
Exception
:
except
Exception
:
self
.
logger
.
exception
(
f
"
FATAL: unable to set the
'
phy_deleted_on
'
flag for VOSpace node having ID =
{
nodeId
}
"
)
self
.
logger
.
exception
(
f
"
FATAL: unable to set the
'
phy_deleted_on
'
flag for VOSpace node having ID =
{
nodeId
}
"
)
return
return
if
basePath
not
in
basePaths
:
if
os
.
path
.
exists
(
basePath
)
and
basePath
not
in
basePaths
:
basePaths
.
append
(
basePath
)
basePaths
.
append
(
basePath
)
self
.
logger
.
info
(
"
Removing empty folders (if any)...
"
)
self
.
logger
.
info
(
"
Removing empty folders (if any)...
"
)
for
basePath
in
basePaths
:
for
basePath
in
basePaths
:
...
...
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