mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Typing checking for galaxy-job-execution.
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import logging
|
||||
|
||||
from galaxy import (
|
||||
exceptions,
|
||||
model,
|
||||
util
|
||||
)
|
||||
from galaxy.exceptions import ItemAccessibilityException, ObjectAttributeMissingException
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@@ -26,19 +26,19 @@ class JobPortsView:
|
||||
key = "job_key"
|
||||
if key not in kwargs:
|
||||
error_message = "Job files action requires a valid '%s'." % key
|
||||
raise exceptions.ObjectAttributeMissingException(error_message)
|
||||
raise ObjectAttributeMissingException(error_message)
|
||||
|
||||
job_id = self._security.decode_id(encoded_job_id)
|
||||
job_key = self._security.encode_id(job_id, kind="jobs_files")
|
||||
if not util.safe_str_cmp(kwargs["job_key"], job_key):
|
||||
raise exceptions.ItemAccessibilityException("Invalid job_key supplied.")
|
||||
raise ItemAccessibilityException("Invalid job_key supplied.")
|
||||
|
||||
# Verify job is active. Don't update the contents of complete jobs.
|
||||
sa_session = self._app.model.context.current
|
||||
job = sa_session.query(model.Job).get(job_id)
|
||||
if not job.running:
|
||||
error_message = "Attempting to read or modify the files of a job that has already completed."
|
||||
raise exceptions.ItemAccessibilityException(error_message)
|
||||
raise ItemAccessibilityException(error_message)
|
||||
return job
|
||||
|
||||
@property
|
||||
|
||||
@@ -1 +1 @@
|
||||
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
|
||||
__path__ = __import__('pkgutil').extend_path(__path__, __name__) # type: ignore
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ PACKAGE_DIRS=(
|
||||
# tool_util not yet working 100%,
|
||||
# data has many problems quota, tool shed install database, etc..
|
||||
RUN_TESTS=(1 1 1 1 1 1 1 1 1 1 0 0)
|
||||
RUN_MYPY=(1 1 1 1 1 1 0 0 0 0 0 0)
|
||||
RUN_MYPY=(1 1 1 1 1 1 1 0 0 0 0 0)
|
||||
for ((i=0; i<${#PACKAGE_DIRS[@]}; i++)); do
|
||||
package_dir=${PACKAGE_DIRS[$i]}
|
||||
run_tests=${RUN_TESTS[$i]}
|
||||
|
||||
Reference in New Issue
Block a user