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
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
slapos.toolbox
Commits
1fe673e2
Commit
1fe673e2
authored
Jul 15, 2024
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
promise/plugin: check_file_state configurability fix
Fail early in case of bad promise configuration.
parent
f5bcc917
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
slapos/promise/plugin/check_file_state.py
slapos/promise/plugin/check_file_state.py
+4
-0
No files found.
slapos/promise/plugin/check_file_state.py
View file @
1fe673e2
...
...
@@ -12,6 +12,10 @@ class RunPromise(GenericPromise):
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'
))
if
self
.
result_count
<
self
.
failure_amount
:
raise
ValueError
(
'Bad configuration: result-count %i < failure_amount %i'
%
(
self
.
result_count
,
self
.
failure_amount
))
if
self
.
getConfig
(
'perdiodic-only'
,
'false'
).
lower
()
in
(
'true'
,
'yes'
,
'1'
):
...
...
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