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
isaak yansane-sisk
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
Hide 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()))
...
@@ -126,4 +130,4 @@ if __name__ == "__main__":
...
@@ -126,4 +130,4 @@ if __name__ == "__main__":
exit(0)
exit(0)
else:
else:
exit(1)
exit(1)
\ No newline at end of file
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