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
Boxiang Sun
slapos.toolbox
Commits
b6012c2f
Commit
b6012c2f
authored
Feb 20, 2015
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runner: add startAllProcesses API.
parent
a3852b8d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
slapos/runner/utils.py
slapos/runner/utils.py
+7
-0
slapos/runner/views.py
slapos/runner/views.py
+6
-1
No files found.
slapos/runner/utils.py
View file @
b6012c2f
...
...
@@ -460,6 +460,13 @@ def svcStopAll(config):
except
:
pass
def
svcStartAll
(
config
):
"""Start all Instance processes on this computer"""
try
:
return
Popen
([
config
[
'slapos'
],
'node'
,
'supervisorctl'
,
'--cfg'
,
config
[
'configuration_file_path'
],
'start'
,
'all'
]).
communicate
()[
0
]
except
:
pass
def
removeInstanceRoot
(
config
):
"""Clean instance directory and stop all its running processes"""
...
...
slapos/runner/views.py
View file @
b6012c2f
...
...
@@ -30,7 +30,7 @@ from slapos.runner.utils import (checkSoftwareFolder, configNewSR,
saveSession
,
saveBuildAndRunParams
,
setMiniShellHistory
,
stopProxy
,
svcStartStopProcess
,
svcStopAll
,
tail
,
svcStartStopProcess
,
svcSt
artAll
,
svcSt
opAll
,
tail
,
updateInstanceParameter
)
from
slapos.runner.fileBrowser
import
FileBrowser
...
...
@@ -252,6 +252,9 @@ def stopAllPartition():
svcStopAll
(
app
.
config
)
return
redirect
(
url_for
(
'inspectInstance'
))
def
startAllPartition
():
svcStartAll
(
app
.
config
)
return
redirect
(
url_for
(
'inspectInstance'
))
def
tailProcess
(
process
):
return
render_template
(
'processTail.html'
,
...
...
@@ -792,6 +795,8 @@ app.add_url_rule("/getFileLog", 'getFileLog', getFileLog,
methods
=
[
'POST'
])
app
.
add_url_rule
(
'/stopAllPartition'
,
'stopAllPartition'
,
stopAllPartition
,
methods
=
[
'GET'
])
app
.
add_url_rule
(
'/startAllPartition'
,
'startAllPartition'
,
startAllPartition
,
methods
=
[
'GET'
])
app
.
add_url_rule
(
'/tailProcess/name/<process>'
,
'tailProcess'
,
tailProcess
,
methods
=
[
'GET'
])
app
.
add_url_rule
(
'/startStopProccess/name/<process>/cmd/<action>'
,
...
...
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