Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos-caddy
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
Guillaume Hervier
slapos-caddy
Commits
1d058742
Commit
1d058742
authored
Dec 22, 2014
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Monitor stack: add informations in rss feed.
Informations about what failed and what succeeded.
parent
aef6d693
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
stack/monitor/buildout.cfg
stack/monitor/buildout.cfg
+1
-1
stack/monitor/status2rss.py
stack/monitor/status2rss.py
+4
-1
No files found.
stack/monitor/buildout.cfg
View file @
1d058742
...
...
@@ -119,7 +119,7 @@ mode = 0644
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
download-only = true
md5sum =
5f1b93ccdea7c3031aef396154c64938
md5sum =
6c84a826778cb059754623f39b33651b
destination = ${buildout:parts-directory}/monitor-template-rss-bin
filename = status2rss.py
mode = 0644
...
...
stack/monitor/status2rss.py
View file @
1d058742
...
...
@@ -34,9 +34,12 @@ for row in rows:
event_time
=
datetime
.
datetime
.
fromtimestamp
(
line_timestamp
).
strftime
(
'%Y-%m-%d %H:%M:%S'
)
individual_rows
=
db
.
execute
(
"select status, element, output from individual_status where timestamp=?"
,
(
line_timestamp
,))
description
=
'
\
n
'
.
join
([
'%s: %s %s'
%
row
for
row
in
individual_rows
])
rss_item
=
PyRSS2Gen
.
RSSItem
(
title
=
status
,
description
=
"%s: %s
"
%
(
event_time
,
status
),
description
=
"%s: %s
\
n
%s"
%
(
event_time
,
status
,
description
),
link
=
LINK
,
pubDate
=
event_time
,
guid
=
PyRSS2Gen
.
Guid
(
base64
.
b64encode
(
"%s, %s"
%
(
event_time
,
status
)))
...
...
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