mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge, rebuild.
This commit is contained in:
@@ -2507,7 +2507,7 @@ extend(Track.prototype, Drawable.prototype, {
|
||||
var data = result.data;
|
||||
|
||||
// Tracks may not have stat data either because there is no data or data is not yet ready.
|
||||
if (data !== undefined && data.min !== undefined && data.max !== undefined) {
|
||||
if (data && data.min !== undefined && data.max !== undefined) {
|
||||
// Compute default minimum and maximum values
|
||||
var min_value = data.min,
|
||||
max_value = data.max;
|
||||
|
||||
@@ -961,8 +961,13 @@ class PostJobAction( object ):
|
||||
|
||||
|
||||
class PostJobActionAssociation( object ):
|
||||
def __init__(self, pja, job):
|
||||
self.job = job
|
||||
def __init__(self, pja, job=None, job_id=None ):
|
||||
if job is not None:
|
||||
self.job = job
|
||||
elif job_id is not None:
|
||||
self.job_id = job_id
|
||||
else:
|
||||
raise Exception("PostJobActionAssociation must be created with a job or a job_id.")
|
||||
self.post_job_action = pja
|
||||
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@ class DatasetsController( BaseAPIController, UsesVisualizationMixin ):
|
||||
if msg:
|
||||
return msg
|
||||
|
||||
# Get datasources and check for essages.
|
||||
# Get datasources and check for messages.
|
||||
data_sources = dataset.get_datasources( trans )
|
||||
messages_list = [ data_source_dict[ 'message' ] for data_source_dict in data_sources.values() ]
|
||||
return_message = self._get_highest_priority_msg( messages_list )
|
||||
@@ -251,7 +251,7 @@ class DatasetsController( BaseAPIController, UsesVisualizationMixin ):
|
||||
|
||||
registry = trans.app.data_provider_registry
|
||||
|
||||
# allow the caller to specifiy which provider is used
|
||||
# allow the caller to specify which provider is used
|
||||
# pulling from the original providers if possible, then the new providers
|
||||
if provider:
|
||||
if provider in registry.dataset_type_name_to_data_provider:
|
||||
|
||||
@@ -1118,6 +1118,7 @@ class ToolModule( WorkflowModule ):
|
||||
|
||||
# Combine workflow and runtime post job actions into the effective post
|
||||
# job actions for this execution.
|
||||
flush_required = False
|
||||
effective_post_job_actions = step.post_job_actions[:]
|
||||
for key, value in self.runtime_post_job_actions.iteritems():
|
||||
effective_post_job_actions.append( self.__to_pja( key, value, None ) )
|
||||
@@ -1125,7 +1126,11 @@ class ToolModule( WorkflowModule ):
|
||||
if pja.action_type in ActionBox.immediate_actions:
|
||||
ActionBox.execute( self.trans.app, self.trans.sa_session, pja, job, replacement_dict )
|
||||
else:
|
||||
job.add_post_job_action( pja )
|
||||
pjaa = model.PostJobActionAssociation( pja, job_id=job.id )
|
||||
self.trans.sa_session.add(pjaa)
|
||||
flush_required = True
|
||||
if flush_required:
|
||||
self.trans.sa_session.flush()
|
||||
|
||||
def add_dummy_datasets( self, connections=None):
|
||||
if connections:
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,3 +1,4 @@
|
||||
"""Unit module for LazyProcess object in galaxy.util.lazy_process."""
|
||||
import os
|
||||
import tempfile
|
||||
import time
|
||||
@@ -6,6 +7,7 @@ from galaxy.util.lazy_process import LazyProcess
|
||||
|
||||
|
||||
def test_lazy_process():
|
||||
"""Create process, ensure start_process starts it and shutdown kills it."""
|
||||
t = tempfile.NamedTemporaryFile()
|
||||
os.remove(t.name)
|
||||
lazy_process = LazyProcess(["bash", "-c", "touch %s; sleep 100" % t.name])
|
||||
@@ -15,4 +17,10 @@ def test_lazy_process():
|
||||
time.sleep(.01)
|
||||
assert lazy_process.process.poll() is None
|
||||
lazy_process.shutdown()
|
||||
assert lazy_process.process.poll()
|
||||
ret_val = None
|
||||
for i in range(10):
|
||||
ret_val = lazy_process.process.poll()
|
||||
if ret_val is not None:
|
||||
break
|
||||
time.sleep(.01)
|
||||
assert ret_val is not None
|
||||
|
||||
Reference in New Issue
Block a user