Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Aurel
slapos
Commits
1d058742
Commit
1d058742
authored
10 years ago
by
Cédric de Saint Martin
Browse files
Options
Download
Email Patches
Plain Diff
Monitor stack: add informations in rss feed.
Informations about what failed and what succeeded.
parent
aef6d693
Changes
2
Hide 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
...
...
This diff is collapsed.
Click to expand it.
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
)))
...
...
This diff is collapsed.
Click to expand it.
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