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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
glucas
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