Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offloading file creation form the webserver #2004

Merged
merged 2 commits into from
Nov 29, 2016

Conversation

josenavas
Copy link
Contributor

I think there was an issue open but I can't find it - if somebody knows which one it is, it will be nice if it can be linked here.

Already noted in the code but explaining it here to. It is moving this processing to the ipyhon cluster, which means that qiita_db.handlers is importing from qiita_ware. We had a rule to not import from qiita_ware in qiita_db, but I think in this case is acceptable given that it's the webserver.

This may point out that we probably want to move this handlers out of qiita_db, and create a new module called qiita_rest.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.09%) to 91.351% when pulling 3033a05 on josenavas:asyncio into d9d7f83 on biocore:master.

Copy link
Member

@antgonza antgonza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, one misspelling. There are no direct tests for the new methods added, like wait_for_processing_job and _job_completer, which I think is fine as they are being tested in the full run. My only concern is that you are missing areas in the full code that need we need to add wait_for_processing_job. I think the best way to be sure is to deploy in the test env and check that is working. @ElDeveloper or @wasade, could you review?



def wait_for_processing_job(job_id):
"""Waits unitl a processing job is completed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

until

# We agreed before that qiita db should never import from
# qiita_ware. However, this is part of the rest API and I think it
# is acceptable to import from qiita_ware, specially to offload
# processed to the ipython cluster
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

processed -> processing (?)

job = qdb.processing_job.ProcessingJob(job_id)
try:
job.complete(payload_success, artifacts, error)
except Exception as e:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be worth to save the traceback itself? Or is this information presented to the user?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be shown to the user, but if it fails at this point is better for us if it is actually store the traceback, so thanks for pointing that out!

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.09%) to 91.352% when pulling aacf4e0 on josenavas:asyncio into d9d7f83 on biocore:master.

Copy link
Member

@antgonza antgonza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, @ElDeveloper ?

@ElDeveloper
Copy link
Member

Looks great, thanks for making the changes @josenavas!

@ElDeveloper ElDeveloper merged commit dc10f09 into qiita-spots:master Nov 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants