Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos
Commits
4de4494d
Commit
4de4494d
authored
Nov 29, 2012
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify slapmonitor recipe with createWrapper
parent
4779756b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
28 deletions
+9
-28
slapos/recipe/slapmonitor/__init__.py
slapos/recipe/slapmonitor/__init__.py
+9
-22
slapos/recipe/slapmonitor/template/slapmonitor_run.in
slapos/recipe/slapmonitor/template/slapmonitor_run.in
+0
-6
No files found.
slapos/recipe/slapmonitor/__init__.py
View file @
4de4494d
...
@@ -24,31 +24,18 @@
...
@@ -24,31 +24,18 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
#
##############################################################################
##############################################################################
from
slapos.recipe.librecipe
import
GenericBaseRecipe
from
slapos.recipe.librecipe
import
GenericBaseRecipe
class
Recipe
(
GenericBaseRecipe
):
class
Recipe
(
GenericBaseRecipe
):
"""
Slapmonitor instance configuration.
"""
def
__init__
(
self
,
buildout
,
name
,
options
):
return
GenericBaseRecipe
.
__init__
(
self
,
buildout
,
name
,
options
)
def
install
(
self
):
def
install
(
self
):
config
=
dict
(
options
=
self
.
options
pid_file_path
=
self
.
options
[
'pid-file'
],
script
=
self
.
createWrapper
(
name
=
options
[
'path'
],
database_path
=
self
.
options
[
'database-path'
],
command
=
options
[
'slapmonitor-path'
],
slapmonitor_path
=
self
.
options
[
'slapmonitor-path'
],
parameters
=
[
shell_path
=
self
.
options
[
'shell-path'
],
options
[
'pid-file'
],
)
options
[
'database-path'
],
])
# Runners
return
[
script
]
runner_path
=
self
.
createExecutable
(
self
.
options
[
'path'
],
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'slapmonitor_run.in'
),
config
))
return
[
runner_path
]
def
update
(
self
):
pass
slapos/recipe/slapmonitor/template/slapmonitor_run.in
deleted
100644 → 0
View file @
4779756b
#!%(shell_path)s
# BEWARE: This file is operated by slapgrid
# BEWARE: It will be overwritten automatically
#
exec %(slapmonitor_path)s %(pid_file_path)s %(database_path)s
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