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
Boxiang Sun
slapos.toolbox
Commits
186591de
Commit
186591de
authored
Aug 30, 2016
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Generate document to list json file in monitoring public/private folder
parent
bd2edb77
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
slapos/monitor/globalstate.py
slapos/monitor/globalstate.py
+17
-0
No files found.
slapos/monitor/globalstate.py
View file @
186591de
...
...
@@ -159,6 +159,23 @@ def run(args_list):
with
open
(
public_state_file
,
'w'
)
as
fpglobal
:
fpglobal
.
write
(
json
.
dumps
(
public_state_dict
))
# Save document list in a file called _document_list
public_document_list
=
[
os
.
path
.
splitext
(
file
)[
0
]
for
file
in
os
.
listdir
(
status_folder
)
if
file
.
endswith
(
'.json'
)]
private_document_list
=
[
os
.
path
.
splitext
(
file
)[
0
]
for
file
in
os
.
listdir
(
base_folder
)
if
file
.
endswith
(
'.json'
)]
data_document_list
=
[
os
.
path
.
splitext
(
file
)[
0
]
for
file
in
os
.
listdir
(
statistic_folder
)
if
file
.
endswith
(
'.json'
)]
with
open
(
os
.
path
.
join
(
status_folder
,
'_document_list'
),
'w'
)
as
lfile
:
lfile
.
write
(
'
\
n
'
.
join
(
public_document_list
))
with
open
(
os
.
path
.
join
(
base_folder
,
'_document_list'
),
'w'
)
as
lfile
:
lfile
.
write
(
'
\
n
'
.
join
(
private_document_list
))
with
open
(
os
.
path
.
join
(
statistic_folder
,
'_document_list'
),
'w'
)
as
lfile
:
lfile
.
write
(
'
\
n
'
.
join
(
data_document_list
))
generateStatisticsData
(
os
.
path
.
join
(
statistic_folder
,
'monitor_state.data.json'
),
global_state_dict
)
...
...
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