diff options
author | Eric Wong <e@80x24.org> | 2015-12-08 11:16:00 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2015-12-13 12:37:33 +0000 |
commit | c2ad650bacfbcdc592ae52171ed9e7e88e09ebc2 (patch) | |
tree | de23b2b949be490073e6c6835819655f81d805bb /lib/dtas/mlib.rb | |
parent | 8b2ac38c6483eb396b2966531a82b15603958adf (diff) | |
download | dtas-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.rb | 5 |
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 |