Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Łukasz Nowak
slapos.toolbox
Commits
33e71443
Commit
33e71443
authored
Dec 08, 2016
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix cleanup of monitor promises result folder
parent
d8008cde
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
slapos/monitor/monitor.py
slapos/monitor/monitor.py
+7
-5
No files found.
slapos/monitor/monitor.py
View file @
33e71443
...
...
@@ -386,7 +386,7 @@ class Monitoring(object):
# cleanup removed report json result
if
report_name_list
!=
[]:
for
report_name
in
report_name_list
:
result_path
=
os
.
path
.
join
(
self
.
public
_folder
,
'%s.report.json'
%
report_name
)
result_path
=
os
.
path
.
join
(
self
.
report
_folder
,
'%s.report.json'
%
report_name
)
if
os
.
path
.
exists
(
result_path
):
try
:
os
.
unlink
(
result_path
)
...
...
@@ -418,13 +418,15 @@ class Monitoring(object):
'--hosting_name "%s"'
%
self
.
root_title
]
registered_promise_list
=
os
.
listdir
(
self
.
promise_folder
)
registered_promise_list
.
extend
(
os
.
listdir
(
self
.
monitor_promise_folder
))
delete_promise_list
=
[]
for
service_name
in
service_name_list
:
if
service_name
in
registered_promise_list
:
service_name_list
.
pop
(
service_name_list
.
index
(
service_name
)
)
if
not
service_name
in
registered_promise_list
:
delete_promise_list
.
append
(
service_name
)
if
service_nam
e_list
!=
[]:
if
delete_promis
e_list
!=
[]:
# XXX Some service was removed, delete his status file so monitor will not consider the status anymore
for
service_name
in
service_nam
e_list
:
for
service_name
in
delete_promis
e_list
:
status_path
=
os
.
path
.
join
(
self
.
public_folder
,
'%s.status.json'
%
service_name
)
if
os
.
path
.
exists
(
status_path
):
try
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment