Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Łukasz Nowak
erp5
Commits
88e050d6
Commit
88e050d6
authored
Aug 08, 2011
by
Łukasz Nowak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow to pass specific slapproxy log file.
parent
f200c1f8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
erp5/util/testnode/SlapOSControler.py
erp5/util/testnode/SlapOSControler.py
+8
-2
No files found.
erp5/util/testnode/SlapOSControler.py
View file @
88e050d6
...
@@ -32,15 +32,21 @@ import xml_marshaller
...
@@ -32,15 +32,21 @@ import xml_marshaller
class
SlapOSControler
(
object
):
class
SlapOSControler
(
object
):
def
__init__
(
self
,
config
,
log
,
process_group_pid_set
=
None
):
def
__init__
(
self
,
config
,
log
,
process_group_pid_set
=
None
,
slapproxy_log
=
None
):
self
.
log
=
log
self
.
log
=
log
self
.
config
=
config
self
.
config
=
config
# By erasing everything, we make sure that we are able to "update"
# By erasing everything, we make sure that we are able to "update"
# existing profiles. This is quite dirty way to do updates...
# existing profiles. This is quite dirty way to do updates...
if
os
.
path
.
exists
(
config
[
'proxy_database'
]):
if
os
.
path
.
exists
(
config
[
'proxy_database'
]):
os
.
unlink
(
config
[
'proxy_database'
])
os
.
unlink
(
config
[
'proxy_database'
])
kwargs
=
dict
(
close_fds
=
True
,
preexec_fn
=
os
.
setsid
)
if
slapproxy_log
is
not
None
:
slapproxy_log_fp
=
open
(
slapproxy_log
,
'w'
)
kwargs
[
'stdout'
]
=
slapproxy_log_fp
kwargs
[
'stderr'
]
=
slapproxy_log_fp
proxy
=
subprocess
.
Popen
([
config
[
'slapproxy_binary'
],
proxy
=
subprocess
.
Popen
([
config
[
'slapproxy_binary'
],
config
[
'slapos_config'
]],
close_fds
=
True
,
preexec_fn
=
os
.
setsid
)
config
[
'slapos_config'
]],
**
kwargs
)
process_group_pid_set
.
add
(
proxy
.
pid
)
process_group_pid_set
.
add
(
proxy
.
pid
)
# XXX: dirty, giving some time for proxy to being able to accept
# XXX: dirty, giving some time for proxy to being able to accept
# connections
# connections
...
...
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