Skip to content

Commit

Permalink
Merge pull request #160 from squirrelo/integrate-run-call
Browse files Browse the repository at this point in the history
add run command call to website
  • Loading branch information
antgonza committed Jun 21, 2014
2 parents a6f1174 + df2f05b commit b1910a9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion qiita_pet/handlers/analysis_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
# -----------------------------------------------------------------------------
from __future__ import division

from tornado.web import authenticated
from tornado.web import authenticated, asynchronous
from collections import defaultdict

from qiita_pet.handlers.base_handlers import BaseHandler
from qiita_ware.run import run_analysis
from qiita_db.user import User
from qiita_db.analysis import Analysis
from qiita_db.study import Study
Expand Down Expand Up @@ -108,6 +109,7 @@ def get(self, analysis_id):
commands=commands)

@authenticated
@asynchronous
def post(self, analysis_id):
command_args = self.get_arguments("commands")
split = [x.split("#") for x in command_args]
Expand All @@ -122,6 +124,9 @@ def post(self, analysis_id):
aid=analysis_id, aname=analysis.name,
commands=commands)
# fire off analysis run here
# currently synch run so redirect done here. Will remove after demo
run_analysis(analysis)
self.redirect("/analysis/results/%s" % analysis_id)


class AnalysisResultsHandler(BaseHandler):
Expand Down
4 changes: 2 additions & 2 deletions qiita_ware/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ def sync(self, data):
dict of objects and to sync
"""
#self.reserved[:].update(data)
#self.general[:].update(data)
# self.reserved[:].update(data)
# self.general[:].update(data)
self.demo[:].update(data)

def submit_async(self, cmd, *args, **kwargs):
Expand Down

0 comments on commit b1910a9

Please sign in to comment.