about summary refs log tree commit homepage
path: root/lib/dtas/mlib.rb
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-12-08 11:16:00 +0000
committerEric Wong <e@80x24.org>2015-12-13 12:37:33 +0000
commitc2ad650bacfbcdc592ae52171ed9e7e88e09ebc2 (patch)
treede23b2b949be490073e6c6835819655f81d805bb /lib/dtas/mlib.rb
parent8b2ac38c6483eb396b2966531a82b15603958adf (diff)
downloaddtas-c2ad650bacfbcdc592ae52171ed9e7e88e09ebc2.tar.gz
We'll continue supporting Ruby 1.9.3 as long as Debian wheezy is
supported.
Diffstat (limited to 'lib/dtas/mlib.rb')
-rw-r--r--lib/dtas/mlib.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/dtas/mlib.rb b/lib/dtas/mlib.rb
index c7ea1df..702ed6a 100644
--- a/lib/dtas/mlib.rb
+++ b/lib/dtas/mlib.rb
@@ -129,11 +129,14 @@ class DTAS::Mlib
     end
   end
 
-  def update(path, jobs: 8)
+  def update(path, opts = nil)
     # n.b. "jobs" is for CPU concurrency.  Audio media is typically stored
     # on high-latency media or slow network file systems; so we use a high
     # number of jobs by default to compensate for the seek-heavy workload
     # this generates
+    opts ||= {}
+    jobs = opts[:jobs] || 8
+
     init_suffixes
     st = File.stat(path) # we always follow the first dir even if it's a symlink
     st.directory? or