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
Hardik Juneja
erp5
Commits
49e3a5dd
Commit
49e3a5dd
authored
Dec 08, 2016
by
Loic Esteve
Committed by
Hardik Juneja
Oct 09, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better implementation of effective_n_jobs
to prevent n_jobs <=0
parent
4047fcc7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
product/CMFActivity/ActivityJoblibBackend.py
product/CMFActivity/ActivityJoblibBackend.py
+7
-2
No files found.
product/CMFActivity/ActivityJoblibBackend.py
View file @
49e3a5dd
...
...
@@ -79,8 +79,13 @@ if ENABLE_JOBLIB:
def
__init__
(
self
,
*
args
,
**
kwargs
):
self
.
zope_context
=
kwargs
[
'zope_context'
]
def
effective_n_jobs
(
self
,
n_jobs
):
# TODO
return
n_jobs
"""Dummy implementation to prevent n_jobs <=0
and allow (sequential) n_jobs=1 and n_jobs != 1 (parallel) behaviour
"""
if
n_jobs
==
0
:
raise
ValueError
(
'n_jobs == 0 in Parallel has no meaning'
)
return
abs
(
n_jobs
)
def
apply_async
(
self
,
batch
,
callback
=
None
):
"""Schedule a func to be run"""
portal_activities
=
self
.
zope_context
.
portal_activities
...
...
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