Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jean-Paul Smets
slapos
Commits
0854f95d
Commit
0854f95d
authored
Dec 30, 2013
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stack-monitor: monitor.py doesn't always say "failure"
parent
057f060d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
stack/monitor/monitor.py.in
stack/monitor/monitor.py.in
+8
-4
No files found.
stack/monitor/monitor.py.in
View file @
0854f95d
...
@@ -91,10 +91,14 @@ def runScripts(directory):
...
@@ -91,10 +91,14 @@ def runScripts(directory):
def writeFiles(monitors):
def writeFiles(monitors):
if len(monitors) == 0:
fail = False
message = "SUCCESS : everything is ok\n"
for i in monitors.values():
if i != "" :
fail = True
if fail:
message = "FAILURE : something went wrong\n"
else:
else:
message =
"FAILURE : something went wrong
\n"
message =
"SUCCESS : everything is ok
\n"
date = datetime.datetime.now().ctime()
date = datetime.datetime.now().ctime()
monitors['datetime'] = date
monitors['datetime'] = date
file_bool = os.path.join(monitoring_folder_bool, str(time.time()))
file_bool = os.path.join(monitoring_folder_bool, str(time.time()))
...
...
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