Skip to content

Commit 25a6722

Browse files
committed
MAINT: Move import inside a sub-command
1 parent 2d5015c commit 25a6722

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

scripts/qiita

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ from qiita_db.exceptions import QiitaDBConnectionError
2727
from qiita_core.configuration_manager import ConfigurationManager
2828
from qiita_ware.commands import ebi_actions, submit_EBI as _submit_EBI
2929
from qiita_ware import r_server
30-
from qiita_pet.webserver import Application
3130

3231

3332
_CONFIG = ConfigurationManager()
@@ -60,6 +59,7 @@ def ebi():
6059
def maintenance():
6160
pass
6261

62+
6363
@qiita.group()
6464
def webserver():
6565
pass
@@ -259,6 +259,12 @@ def status():
259259
@click.option('--port', required=False, type=int, help='Port where the '
260260
'webserver will start', default=8888)
261261
def start(port):
262+
# in order to use this command you need to have an IPython cluster running,
263+
# for now this makes it so that you can use other sub-commands without
264+
# having to do that. The solution will (perhaps) to move this subcommand
265+
# into an entirely different script.
266+
from qiita_pet.webserver import Application
267+
262268
http_server = tornado.httpserver.HTTPServer(Application())
263269
http_server.listen(port)
264270
print("Qiita started on port", port)

0 commit comments

Comments
 (0)