Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
cloudooo
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
Vincent Bechu
cloudooo
Commits
f67af279
Commit
f67af279
authored
May 05, 2014
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
follow API changes of psutil-2.0.0.
parent
c661600c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
6 deletions
+6
-6
cloudooo/handler/ooo/application/application.py
cloudooo/handler/ooo/application/application.py
+1
-1
cloudooo/handler/ooo/application/openoffice.py
cloudooo/handler/ooo/application/openoffice.py
+2
-2
cloudooo/handler/ooo/monitor/memory.py
cloudooo/handler/ooo/monitor/memory.py
+1
-1
cloudooo/tests/runHandlerUnitTest.py
cloudooo/tests/runHandlerUnitTest.py
+1
-1
setup.py
setup.py
+1
-1
No files found.
cloudooo/handler/ooo/application/application.py
View file @
f67af279
...
...
@@ -85,7 +85,7 @@ class Application(object):
process
=
Process
(
pid
)
try
:
for
connection
in
process
.
get_
connections
():
for
connection
in
process
.
connections
():
if
connection
.
status
==
'LISTEN'
and
\
connection
.
local_address
[
1
]
==
self
.
port
:
return
True
...
...
cloudooo/handler/ooo/application/openoffice.py
View file @
f67af279
...
...
@@ -117,8 +117,8 @@ class OpenOffice(Application):
def
_releaseOpenOfficePort
(
self
):
for
process
in
psutil
.
process_iter
():
try
:
if
process
.
exe
==
join
(
self
.
office_binary_path
,
self
.
_bin_soffice
):
for
connection
in
process
.
get_
connections
():
if
process
.
exe
()
==
join
(
self
.
office_binary_path
,
self
.
_bin_soffice
):
for
connection
in
process
.
connections
():
if
connection
.
status
==
"LISTEN"
and
\
connection
.
local_address
[
1
]
==
self
.
port
:
process
.
terminate
()
...
...
cloudooo/handler/ooo/monitor/memory.py
View file @
f67af279
...
...
@@ -52,7 +52,7 @@ class MonitorMemory(Monitor, Process):
if
not
hasattr
(
self
,
'process'
)
or
\
self
.
process
.
pid
!=
int
(
self
.
openoffice
.
pid
()):
self
.
create_process
()
return
self
.
process
.
get_
memory_info
().
rss
/
(
1024
*
1024
)
return
self
.
process
.
memory_info
().
rss
/
(
1024
*
1024
)
except
TypeError
:
logger
.
debug
(
"OpenOffice is stopped"
)
return
0
...
...
cloudooo/tests/runHandlerUnitTest.py
View file @
f67af279
...
...
@@ -17,7 +17,7 @@ from signal import SIGQUIT
def
wait_use_port
(
pid
,
timeout_limit
=
30
):
process
=
psutil
.
Process
(
pid
)
for
n
in
range
(
timeout_limit
):
if
len
(
process
.
get_
connections
())
>
0
:
if
len
(
process
.
connections
())
>
0
:
return
True
sleep
(
1
)
return
False
...
...
setup.py
View file @
f67af279
...
...
@@ -14,7 +14,7 @@ install_requires = [
'PasteDeploy'
,
'PasteScript'
,
'WSGIUtils'
,
'psutil>=
0.2
.0'
,
'psutil>=
2.0
.0'
,
'lxml'
,
'python-magic'
,
'argparse'
,
...
...
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