Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos-caddy
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
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
Guillaume Hervier
slapos-caddy
Commits
f9e2330e
Commit
f9e2330e
authored
Oct 26, 2016
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
notifier: accepts a new argument, setting a maximum number of run of the wrapped executable
parent
b0bf12a8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
slapos/recipe/notifier.py
slapos/recipe/notifier.py
+4
-2
No files found.
slapos/recipe/notifier.py
View file @
f9e2330e
...
...
@@ -73,7 +73,7 @@ class Notify(GenericBaseRecipe):
self
.
options
=
options
def
createNotifier
(
self
,
notifier_binary
,
wrapper
,
executable
,
log
,
title
,
notification_url
,
feed_url
,
pidfile
=
None
,
log
,
title
,
notification_url
,
feed_url
,
max_run
=
'1'
,
pidfile
=
None
,
instance_root_name
=
None
,
log_url
=
None
,
status_item_directory
=
None
):
if
not
os
.
path
.
exists
(
log
):
...
...
@@ -84,6 +84,7 @@ class Notify(GenericBaseRecipe):
'-l'
,
log
,
'--title'
,
title
,
'--feed'
,
feed_url
,
'--max-run'
,
str
(
max_run
),
'--notification-url'
,
]
parameters
.
extend
(
notification_url
.
split
(
' '
))
...
...
@@ -120,5 +121,6 @@ class Notify(GenericBaseRecipe):
title
=
options
[
'title'
],
pidfile
=
options
[
'pidfile'
],
notification_url
=
options
[
'notify'
],
feed_url
=
feed_url
)
feed_url
=
feed_url
,
max_run
=
options
.
get
(
'max-run'
,
"1"
))
return
[
script
]
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