projects
/
arvados.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
077878d
)
11170: Calling close method from an ensure block.
author
Lucas Di Pentima <lucas@curoverse.com>
Wed, 22 Mar 2017 14:18:55 +0000
(11:18 -0300)
committer
Lucas Di Pentima <lucas@curoverse.com>
Wed, 22 Mar 2017 14:18:55 +0000
(11:18 -0300)
services/api/lib/crunch_dispatch.rb
patch
|
blob
|
history
diff --git
a/services/api/lib/crunch_dispatch.rb
b/services/api/lib/crunch_dispatch.rb
index c95db312f4337bb95efccf72e66e01e3bd8cf4e7..bea1657de22b72c0d5296a4c571afcee3ffc0993 100644
(file)
--- a/
services/api/lib/crunch_dispatch.rb
+++ b/
services/api/lib/crunch_dispatch.rb
@@
-964,9
+964,11
@@
class CrunchDispatch
def squeue_jobs
if Rails.configuration.crunch_job_wrapper == :slurm_immediate
p = IO.popen(['squeue', '-a', '-h', '-o', '%j'])
- l = p.readlines.map {|line| line.strip}
- p.close
- l
+ begin
+ p.readlines.map {|line| line.strip}
+ ensure
+ p.close
+ end
else
[]
end