Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
nexedi
/
erp5
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Merge Requests
111
Wiki
Snippets
Network
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit c4102d17
authored
2012-07-04 18:07:24 +0200
by
Vincent Pelletier
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
xmlrpclib does not support named parameters, use positional ones
1 parent
ee536d37
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
20 deletions
CHANGES.erp5.util.txt
erp5/util/taskdistribution/__init__.py
setup.py
CHANGES.erp5.util.txt
View file @
c4102d1
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 @
c4102d1
...
...
@@ -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 @
c4102d1
...
...
@@ -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
Styling with
Markdown
is supported
Attach a file
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 post a comment