From b56fc111f2c26d4780d095dd48298bf1088ab9a4 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Thu, 26 Jan 2017 07:42:36 -0700 Subject: [PATCH] fix #1066 --- qiita_ware/context.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/qiita_ware/context.py b/qiita_ware/context.py index 1216a350e..4f2ba3809 100644 --- a/qiita_ware/context.py +++ b/qiita_ware/context.py @@ -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):