[hg] galaxy 1703: Move setting of the working directory to the w...
details: http://www.bx.psu.edu/hg/galaxy/rev/c259ce9cb50d changeset: 1703:c259ce9cb50d user: Nate Coraor <nate@bx.psu.edu> date: Wed Jan 14 08:50:31 2009 -0500 description: Move setting of the working directory to the wrapper's init method instead. 1 file(s) affected in this change: lib/galaxy/jobs/__init__.py diffs (37 lines): diff -r b868c8d902d2 -r c259ce9cb50d lib/galaxy/jobs/__init__.py --- a/lib/galaxy/jobs/__init__.py Wed Jan 14 08:43:00 2009 -0500 +++ b/lib/galaxy/jobs/__init__.py Wed Jan 14 08:50:31 2009 -0500 @@ -125,8 +125,6 @@ if job.job_runner_name is not None: # why are we passing the queue to the wrapper? job_wrapper = JobWrapper( job, self.app.toolbox.tools_by_id[ job.tool_id ], self ) - job_wrapper.working_directory = \ - os.path.join( self.app.config.job_working_directory, str( job.id ) ) self.dispatcher.recover( job, job_wrapper ) def __monitor( self ): @@ -300,9 +298,13 @@ self.queue = queue self.app = queue.app self.extra_filenames = [] - self.working_directory = None self.command_line = None self.galaxy_lib_dir = None + # With job outputs in the working directory, we need the working + # directory to be set before prepare is run, or else premature deletion + # and job recovery fail. + self.working_directory = \ + os.path.join( self.app.config.job_working_directory, str( self.job_id ) ) def get_param_dict( self ): """ @@ -319,9 +321,6 @@ config files. """ mapping.context.current.clear() #this prevents the metadata reverting that has been seen in conjunction with the PBS job runner - # Create the working directory - self.working_directory = \ - os.path.join( self.app.config.job_working_directory, str( self.job_id ) ) if not os.path.exists( self.working_directory ): os.mkdir( self.working_directory ) # Restore parameters from the database
participants (1)
-
Nate Coraor