Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
picomon
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Cédric Heintz
picomon
Commits
5c8d89c4
Commit
5c8d89c4
authored
Aug 31, 2014
by
Jonathan Michalon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Store computed 'error_every' in checks, not just the given value
parent
d5dc42f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
picomon/checks.py
picomon/checks.py
+3
-3
No files found.
picomon/checks.py
View file @
5c8d89c4
...
...
@@ -34,6 +34,8 @@ class Check(object):
self
.
retry_count
=
0
self
.
every
=
options
.
get
(
'every'
,
config
.
default_every
)
self
.
error_every
=
options
.
get
(
'error_every'
,
config
.
default_error_every
)
if
self
.
error_every
<
0
:
self
.
error_every
=
self
.
every
self
.
run_count
=
0
self
.
errmsg
=
''
self
.
ok
=
True
...
...
@@ -59,9 +61,7 @@ class Check(object):
def
run
(
self
,
immediate
=
False
):
self
.
run_count
=
(
self
.
run_count
+
1
)
%
(
self
.
every
if
self
.
ok
or
self
.
error_every
<
0
else
self
.
error_every
)
self
.
every
if
self
.
ok
else
self
.
error_every
)
if
self
.
run_count
==
0
or
immediate
:
logging
.
debug
(
'Running '
+
str
(
self
))
self
.
setup
()
...
...
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