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
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Lu Xu
erp5
Commits
c4102d17
Commit
c4102d17
authored
Jul 04, 2012
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xmlrpclib does not support named parameters, use positional ones
parent
ee536d37
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
20 deletions
+22
-20
CHANGES.erp5.util.txt
CHANGES.erp5.util.txt
+9
-1
erp5/util/taskdistribution/__init__.py
erp5/util/taskdistribution/__init__.py
+12
-18
setup.py
setup.py
+1
-1
No files found.
CHANGES.erp5.util.txt
View file @
c4102d17
Changes
=======
0.4.4 (2012-07-XX)
0.4.5 (2012-07-04)
------------------
* erp5.util.taskdistribution:
- xmlrpclib does not support named parameters, use positional ones
[Vincent Pelletier]
0.4.4 (2012-07-04)
------------------
* erp5.util.taskdistribution:
...
...
erp5/util/taskdistribution/__init__.py
View file @
c4102d17
...
...
@@ -102,18 +102,18 @@ class RPCRetry(object):
self
.
_logger
=
logger
self
.
__rpc_lock
=
threading
.
Lock
()
def
_RPC
(
self
,
func_id
,
args
=
()
,
kw
=
{}
):
def
_RPC
(
self
,
func_id
,
args
=
()):
with
self
.
__rpc_lock
:
return
getattr
(
self
.
_proxy
,
func_id
)(
*
args
,
**
kw
)
return
getattr
(
self
.
_proxy
,
func_id
)(
*
args
)
def
_retryRPC
(
self
,
func_id
,
args
=
()
,
kw
=
{}
):
def
_retryRPC
(
self
,
func_id
,
args
=
()):
retry_time
=
self
.
_retry_time
while
True
:
try
:
return
self
.
_RPC
(
func_id
,
args
,
kw
)
return
self
.
_RPC
(
func_id
,
args
)
except
SAFE_RPC_EXCEPTION_LIST
:
self
.
_logger
.
warning
(
'Got exception, retrying: %s
(*%r, **%r)
'
'in %is'
,
func_id
,
args
,
kw
,
retry_time
,
exc_info
=
1
)
self
.
_logger
.
warning
(
'Got exception, retrying: %s
%r
'
'in %is'
,
func_id
,
tuple
(
args
)
,
retry_time
,
exc_info
=
1
)
time
.
sleep
(
retry_time
)
retry_time
*=
1.5
...
...
@@ -396,15 +396,9 @@ class TaskDistributionTool(RPCRetry):
revision has already been completed).
Otherwise, returns a TestResultProxy instance.
"""
result
=
self
.
_retryRPC
(
'createTestResult'
,
kw
=
{
'name'
:
''
,
'revision'
:
revision
,
'test_name_list'
:
test_name_list
,
'allow_restart'
:
allow_restart
,
'test_title'
:
test_title
,
'node_title'
:
node_title
,
'project_title'
:
project_title
,
})
result
=
self
.
_retryRPC
(
'createTestResult'
,
(
''
,
revision
,
test_name_list
,
allow_restart
,
test_title
,
node_title
,
project_title
))
if
result
:
test_result_path
,
revision
=
result
result
=
TestResultProxy
(
self
.
_proxy
,
self
.
_retry_time
,
...
...
@@ -428,7 +422,7 @@ class DummyTaskDistributionTool(object):
def
getProtocolRevision
(
self
):
return
1
def
createTestResult
(
self
,
name
,
revision
,
test_name_list
,
*
args
,
**
kw
):
def
createTestResult
(
self
,
name
,
revision
,
test_name_list
,
*
args
):
self
.
test_name_list
=
test_name_list
[:]
return
None
,
revision
...
...
@@ -439,11 +433,11 @@ class DummyTaskDistributionTool(object):
del
self
.
test_name_list
[
i
]
return
None
,
test
def
stopUnitTest
(
self
,
*
args
,
**
kw
):
def
stopUnitTest
(
self
,
*
args
):
pass
reportTaskFailure
=
reportTaskStatus
=
stopUnitTest
def
isTaskAlive
(
self
,
*
args
,
**
kw
):
def
isTaskAlive
(
self
,
*
args
):
return
int
(
bool
(
self
.
test_name_list
))
setup.py
View file @
c4102d17
...
...
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
import
glob
import
os
version
=
'0.4.
4
'
version
=
'0.4.
5
'
name
=
'erp5.util'
long_description
=
open
(
"README.erp5.util.txt"
).
read
()
+
"
\
n
"
...
...
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