Skip to content

Commit

Permalink
For n_jobs, close client before tearing down cluster (#853)
Browse files Browse the repository at this point in the history
* Close client before scheduler

* update changelog
  • Loading branch information
rwedge authored Feb 28, 2020
1 parent 46d025c commit 5f4b395
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
Changelog
---------
**Future Release**
* Fixes
* Fix a connection closed error when using n_jobs (:pr:`853`)
* Changes
* Pin msgpack dependency for Python 3.5; remove dataframe from Dask dependency (:pr:`851`)

Thanks to the following people for contributing to this release:
:user:`frances-h`
:user:`frances-h`, :user:`rwedge`

**v0.13.2 Jan 31, 2020**
* Enhancements
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -591,12 +591,12 @@ def parallel_calculate_chunks(cutoff_time, chunk_size, feature_set, approximate,
except Exception:
raise
finally:
if 'cluster' not in dask_kwargs and cluster is not None:
cluster.close()

if client is not None:
client.close()

if 'cluster' not in dask_kwargs and cluster is not None:
cluster.close()

feature_matrix = pd.concat(feature_matrix)

return feature_matrix
Expand Down

0 comments on commit 5f4b395

Please sign in to comment.