-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c593d44
commit 212b5f1
Showing
2 changed files
with
40 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -178,6 +178,7 @@ async def submit_job( | |
status_code=400, detail="Please upload a file in FASTA format" | ||
) | ||
|
||
# Validate the FASTA file | ||
try: | ||
content = await sequence_file.read() | ||
parsed = api.SubmittedRequest.parse(content.decode()) | ||
|
@@ -190,11 +191,8 @@ async def submit_job( | |
query.sequences = "\n".join(parsed.sequences) | ||
query.email_address = email_address if email_address else "[email protected]" | ||
|
||
try: | ||
job_id = await jd.JobDispatcher().submit_cmscan_job(query) | ||
except HTTPException as e: | ||
logger.error(f"Error submitting job. Error: {e}") | ||
raise e | ||
# Submit to Job Dispatcher | ||
job_id = await jd.JobDispatcher().submit_cmscan_job(query) | ||
|
||
if email_address: | ||
# Background task to check status | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters