From 9cdd6885956c9c193a41d0dfae984005ed41d884 Mon Sep 17 00:00:00 2001 From: Bjoern Gruening Date: Fri, 1 May 2015 20:54:53 +0200 Subject: [PATCH 1/3] Bind the IPython IE to a fixed Docker Image --- .../interactive_environments/ipython/config/ipython.ini.sample | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/plugins/interactive_environments/ipython/config/ipython.ini.sample b/config/plugins/interactive_environments/ipython/config/ipython.ini.sample index 154f5a54e12..7921f4d9026 100644 --- a/config/plugins/interactive_environments/ipython/config/ipython.ini.sample +++ b/config/plugins/interactive_environments/ipython/config/ipython.ini.sample @@ -8,7 +8,7 @@ [docker] command = docker -image = bgruening/docker-ipython-notebook +image = bgruening/docker-ipython-notebook:0.2 # URL to access the Galaxy API with from the spawn Docker containter, if empty # this falls back to galaxy.ini's galaxy_infrastructure_url and finally to the From a594b32071f0063eb8a588e6a19c90e9ca4dd4af Mon Sep 17 00:00:00 2001 From: John Chilton Date: Tue, 5 May 2015 08:22:45 -0400 Subject: [PATCH 2/3] Fix job files API for case when nginx upload not being used. Fixes regressions introduced with PR #110. --- lib/galaxy/jobs/runners/pulsar.py | 2 +- lib/galaxy/webapps/galaxy/api/job_files.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/jobs/runners/pulsar.py b/lib/galaxy/jobs/runners/pulsar.py index 763e41c9a21..cbf2405fcfe 100644 --- a/lib/galaxy/jobs/runners/pulsar.py +++ b/lib/galaxy/jobs/runners/pulsar.py @@ -342,7 +342,7 @@ class PulsarJobRunner( AsynchronousJobRunner ): encoded_job_id = self.app.security.encode_id(job_id) job_key = self.app.security.encode_id( job_id, kind="jobs_files" ) - endpoint_base = "%s/api/jobs/%s?job_key=%s" + endpoint_base = "%s/api/jobs/%s/files?job_key=%s" if self.app.config.nginx_upload_job_files_path: endpoint_base = "%s" + \ self.app.config.nginx_upload_job_files_path + \ diff --git a/lib/galaxy/webapps/galaxy/api/job_files.py b/lib/galaxy/webapps/galaxy/api/job_files.py index 4b21c1ceb5b..5491ab49059 100644 --- a/lib/galaxy/webapps/galaxy/api/job_files.py +++ b/lib/galaxy/webapps/galaxy/api/job_files.py @@ -99,7 +99,12 @@ class JobFilesAPIController( BaseAPIController ): try: shutil.move( input_file.name, path ) finally: - input_file.close() + try: + input_file.close() + except OSError: + # Fails to close file if not using nginx upload because the + # tempfile has moved and Python wants to delete it. + pass return {"message": "ok"} def __authorize_job_access(self, trans, encoded_job_id, **kwargs): From c1c8259e83499907716b25f671cc5f296b706a50 Mon Sep 17 00:00:00 2001 From: Dannon Baker Date: Fri, 10 Apr 2015 11:23:46 -0400 Subject: [PATCH 3/3] Check to see if toolshed install is actually bound prior to disposing (exact same functionality here, but it's less chatty this way, since it might not be bound) --- lib/galaxy/webapps/galaxy/buildapp.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/webapps/galaxy/buildapp.py b/lib/galaxy/webapps/galaxy/buildapp.py index 4c57821e0f5..07266ad1bda 100644 --- a/lib/galaxy/webapps/galaxy/buildapp.py +++ b/lib/galaxy/webapps/galaxy/buildapp.py @@ -110,7 +110,9 @@ def app_factory( global_conf, **kwargs ): except: log.exception("Unable to dispose of pooled galaxy model database connections.") try: - galaxy.model.tool_shed_install.mapping.metadata.bind.dispose() + # This model may not actually be bound. + if galaxy.model.tool_shed_install.mapping.metadata.bind: + galaxy.model.tool_shed_install.mapping.metadata.bind.dispose() except: log.exception("Unable to dispose of pooled toolshed install model database connections.")