NYU-Molecular-Pathology / snsxt

bioinformatics pipeline framework for data analysis
GNU General Public License v3.0
4 stars 3 forks source link

Need running tasks to kill their jobs on error #21

Open stevekm opened 7 years ago

stevekm commented 7 years ago

If a tasks is creating qsub jobs for every sample in an analysis, and one sample causes an exception to be raised, the remaining qsub jobs might not be killed if they are not in the background jobs list yet. Need to look into method for handling this

stevekm commented 7 years ago

maybe give each task object its own internal job queue to put jobs into and monitor from, and wrap a try ... except around the task running itself, catch if exception is raised and run a task.kill_jobs() method similar to the function used in job_management

stevekm commented 7 years ago

confirmed that raising an exception while a task is monitoring its own jobs leads to the jobs being left running after the program exits

stevekm commented 7 years ago

need to modularize the 'job_management' and maybe add it as a task method

stevekm commented 7 years ago

convert the job_management module into a JobManager object class, use one for monitoring the pipeline background jobs and add them to each task to monitor jobs