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
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
Titouan Soulard
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
Show 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
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:
...
...
erp5/util/taskdistribution/__init__.py
View file @
c4102d17
...
@@ -102,18 +102,18 @@ class RPCRetry(object):
...
@@ -102,18 +102,18 @@ class RPCRetry(object):
self
.
_logger
=
logger
self
.
_logger
=
logger
self
.
__rpc_lock
=
threading
.
Lock
()
self
.
__rpc_lock
=
threading
.
Lock
()
def
_RPC
(
self
,
func_id
,
args
=
()
,
kw
=
{}
):
def
_RPC
(
self
,
func_id
,
args
=
()):
with
self
.
__rpc_lock
:
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
retry_time
=
self
.
_retry_time
while
True
:
while
True
:
try
:
try
:
return
self
.
_RPC
(
func_id
,
args
,
kw
)
return
self
.
_RPC
(
func_id
,
args
)
except
SAFE_RPC_EXCEPTION_LIST
:
except
SAFE_RPC_EXCEPTION_LIST
:
self
.
_logger
.
warning
(
'Got exception, retrying: %s
(*%r, **%r)
'
self
.
_logger
.
warning
(
'Got exception, retrying: %s
%r
'
'in %is'
,
func_id
,
args
,
kw
,
retry_time
,
exc_info
=
1
)
'in %is'
,
func_id
,
tuple
(
args
)
,
retry_time
,
exc_info
=
1
)
time
.
sleep
(
retry_time
)
time
.
sleep
(
retry_time
)
retry_time
*=
1.5
retry_time
*=
1.5
...
@@ -396,15 +396,9 @@ class TaskDistributionTool(RPCRetry):
...
@@ -396,15 +396,9 @@ class TaskDistributionTool(RPCRetry):
revision has already been completed).
revision has already been completed).
Otherwise, returns a TestResultProxy instance.
Otherwise, returns a TestResultProxy instance.
"""
"""
result
=
self
.
_retryRPC
(
'createTestResult'
,
kw
=
{
result
=
self
.
_retryRPC
(
'createTestResult'
,
(
''
,
revision
,
'name'
:
''
,
test_name_list
,
allow_restart
,
test_title
,
node_title
,
'revision'
:
revision
,
project_title
))
'test_name_list'
:
test_name_list
,
'allow_restart'
:
allow_restart
,
'test_title'
:
test_title
,
'node_title'
:
node_title
,
'project_title'
:
project_title
,
})
if
result
:
if
result
:
test_result_path
,
revision
=
result
test_result_path
,
revision
=
result
result
=
TestResultProxy
(
self
.
_proxy
,
self
.
_retry_time
,
result
=
TestResultProxy
(
self
.
_proxy
,
self
.
_retry_time
,
...
@@ -428,7 +422,7 @@ class DummyTaskDistributionTool(object):
...
@@ -428,7 +422,7 @@ class DummyTaskDistributionTool(object):
def
getProtocolRevision
(
self
):
def
getProtocolRevision
(
self
):
return
1
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
[:]
self
.
test_name_list
=
test_name_list
[:]
return
None
,
revision
return
None
,
revision
...
@@ -439,11 +433,11 @@ class DummyTaskDistributionTool(object):
...
@@ -439,11 +433,11 @@ class DummyTaskDistributionTool(object):
del
self
.
test_name_list
[
i
]
del
self
.
test_name_list
[
i
]
return
None
,
test
return
None
,
test
def
stopUnitTest
(
self
,
*
args
,
**
kw
):
def
stopUnitTest
(
self
,
*
args
):
pass
pass
reportTaskFailure
=
reportTaskStatus
=
stopUnitTest
reportTaskFailure
=
reportTaskStatus
=
stopUnitTest
def
isTaskAlive
(
self
,
*
args
,
**
kw
):
def
isTaskAlive
(
self
,
*
args
):
return
int
(
bool
(
self
.
test_name_list
))
return
int
(
bool
(
self
.
test_name_list
))
setup.py
View file @
c4102d17
...
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
...
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
import
glob
import
glob
import
os
import
os
version
=
'0.4.
4
'
version
=
'0.4.
5
'
name
=
'erp5.util'
name
=
'erp5.util'
long_description
=
open
(
"README.erp5.util.txt"
).
read
()
+
"
\
n
"
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