app/services/riiif/command_runner.rb in riiif-1.7.1 vs app/services/riiif/command_runner.rb in riiif-2.0.0.beta1
- old
+ new
@@ -4,9 +4,11 @@
class CommandRunner
include Open3
include ActiveSupport::Benchmarkable
delegate :logger, to: :Rails
+ # TODO: this is being loaded into memory. We could make this a stream.
+ # @return [String] all the image data
def execute(command)
out = nil
benchmark("Riiif executed #{command}") do
stdin, stdout, stderr, wait_thr = popen3(command)
stdin.close