Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
picomon
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
arn
picomon
Commits
fec4da3f
Commit
fec4da3f
authored
Sep 03, 2014
by
Colomban Wendling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix retry count in recovery notifications
parent
9c58d8d6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
picomon/checks.py
picomon/checks.py
+2
-2
picomon/mails.py
picomon/mails.py
+1
-1
No files found.
picomon/checks.py
View file @
fec4da3f
...
...
@@ -67,8 +67,8 @@ class Check(object):
self
.
setup
()
if
not
self
.
check
():
logging
.
debug
(
'Fail: '
+
str
(
self
))
self
.
retry_count
=
min
(
self
.
retry_count
+
1
,
self
.
retry
)
if
self
.
retry_count
=
=
self
.
retry
or
immediate
:
self
.
retry_count
+=
1
if
self
.
retry_count
>
=
self
.
retry
or
immediate
:
if
self
.
ok
:
logging
.
debug
(
'Switched to failure: '
+
str
(
self
))
self
.
failure_date
=
datetime
.
now
()
...
...
picomon/mails.py
View file @
fec4da3f
...
...
@@ -105,7 +105,7 @@ def send_email_for_check(check):
delta
=
datetime
.
now
()
-
check
.
failure_date
# remove microsec
delta
=
delta
-
timedelta
(
microseconds
=
delta
.
microseconds
)
n
=
delta
//
timedelta
(
seconds
=
check
.
error_every
*
config
.
base_tick
)
n
=
check
.
retry_count
+
1
-
check
.
retry
msg_text
+=
(
"recovered after %s (%d %s)."
%
(
delta
,
n
,
"retry"
if
n
==
1
else
"retries"
))
else
:
...
...
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