Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Klaus Wölfel
slapos.toolbox
Commits
cc1d5d16
Commit
cc1d5d16
authored
Sep 02, 2019
by
Łukasz Nowak
Committed by
Łukasz Nowak
Sep 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
promise/plugin: Allow to configure anomaly in check_command_execute
parent
fcc8ff83
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
slapos/promise/plugin/check_command_execute.py
slapos/promise/plugin/check_command_execute.py
+3
-1
No files found.
slapos/promise/plugin/check_command_execute.py
View file @
cc1d5d16
...
@@ -11,6 +11,8 @@ class RunPromise(GenericPromise):
...
@@ -11,6 +11,8 @@ class RunPromise(GenericPromise):
super
(
RunPromise
,
self
).
__init__
(
config
)
super
(
RunPromise
,
self
).
__init__
(
config
)
# SR can set custom periodicity
# SR can set custom periodicity
self
.
setPeriodicity
(
float
(
self
.
getConfig
(
'frequency'
,
2
)))
self
.
setPeriodicity
(
float
(
self
.
getConfig
(
'frequency'
,
2
)))
self
.
result_count
=
int
(
self
.
getConfig
(
'result_count'
,
'1'
))
self
.
failure_amount
=
int
(
self
.
getConfig
(
'failure_amount'
,
'1'
))
def
sense
(
self
):
def
sense
(
self
):
"""
"""
...
@@ -39,4 +41,4 @@ class RunPromise(GenericPromise):
...
@@ -39,4 +41,4 @@ class RunPromise(GenericPromise):
self
.
logger
.
info
(
"OK %r run with success"
%
(
command
,))
self
.
logger
.
info
(
"OK %r run with success"
%
(
command
,))
def
anomaly
(
self
):
def
anomaly
(
self
):
return
self
.
_anomaly
(
result_count
=
3
,
failure_amount
=
3
)
return
self
.
_anomaly
(
result_count
=
self
.
result_count
,
failure_amount
=
self
.
failure_amount
)
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