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
Lu Xu
slapos.toolbox
Commits
42d7e5ca
Commit
42d7e5ca
authored
Jul 20, 2018
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
promise: do not try to read json file when it's not created yet
parent
50707d9e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
slapos/promise/check_apachedex_result/__init__.py
slapos/promise/check_apachedex_result/__init__.py
+2
-0
slapos/promise/check_slow_queries_digest_result/__init__.py
slapos/promise/check_slow_queries_digest_result/__init__.py
+2
-0
No files found.
slapos/promise/check_apachedex_result/__init__.py
View file @
42d7e5ca
...
@@ -42,6 +42,8 @@ def checkApachedexResult(apachedex_path, apachedex_report_status_file, desired_t
...
@@ -42,6 +42,8 @@ def checkApachedexResult(apachedex_path, apachedex_report_status_file, desired_t
message
=
"No result found in the apdex file or the file is corrupted"
message
=
"No result found in the apdex file or the file is corrupted"
break
break
if
not
os
.
path
.
exists
(
apachedex_report_status_file
):
return
0
,
"ApacheDex didn't run yet!"
with
open
(
apachedex_report_status_file
)
as
f
:
with
open
(
apachedex_report_status_file
)
as
f
:
try
:
try
:
json_content
=
json
.
load
(
f
)
json_content
=
json
.
load
(
f
)
...
...
slapos/promise/check_slow_queries_digest_result/__init__.py
View file @
42d7e5ca
...
@@ -53,6 +53,8 @@ def checkMariadbDigestResult(mariadbdex_path, mariadbdex_report_status_file,
...
@@ -53,6 +53,8 @@ def checkMariadbDigestResult(mariadbdex_path, mariadbdex_report_status_file,
message
=
"No result found in the slow query digest file or the file is corrupted"
message
=
"No result found in the slow query digest file or the file is corrupted"
break
break
if
not
os
.
path
.
exists
(
mariadbdex_report_status_file
):
return
0
,
"No slow query result yet!"
with
open
(
mariadbdex_report_status_file
)
as
f
:
with
open
(
mariadbdex_report_status_file
)
as
f
:
try
:
try
:
json_content
=
json
.
load
(
f
)
json_content
=
json
.
load
(
f
)
...
...
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