Skip to content

Commit

Permalink
fix #1066 (#2058)
Browse files Browse the repository at this point in the history
  • Loading branch information
antgonza authored and ElDeveloper committed Jan 26, 2017
1 parent 15fcceb commit 9eb9dbb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions qiita_ware/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,14 @@ class Dispatch(object):
def __init__(self):
from moi import ctx_default
self.demo = Client(profile=ctx_default)

# checking that at least 2 workers exist, see:
# https://github.com/biocore/qiita/issues/1066
workers = len(self.demo.ids)
if workers < 2:
raise ValueError('You need to have at least 2 IPython workers '
'but you have %d' % workers)

self.demo_lview = self.demo.load_balanced_view()

def sync(self, data):
Expand Down

0 comments on commit 9eb9dbb

Please sign in to comment.