roryk / ipython-cluster-helper

Tool to easily start up an IPython cluster on different schedulers.
148 stars 23 forks source link

Refactor cluster_view to make it usable without context manager #27

Closed matthias-k closed 9 years ago

matthias-k commented 9 years ago

While the context manager in cluster_view is really convenient to make sure that the cluster is stopped, there are cases where I would like to control this on my own, especially when debugging in the console. Therefore I refractored the functionality of cluster_view into a class ClusterView that holds all information necessary to stop the cluster. cluster_view then is just a context manager around ClusterView that yields the actual view (thus this is completly backwards compatible).

I will be happy to adjust any implementation and style details.

roryk commented 9 years ago

Thanks! Looks good, sorry for the delay merging this in. Thanks for taking the time to contribute and submitting a couple of nice clean improvements.