Method: KMDB::Jobs::FindFiles#work
- Defined in:
- lib/kmdb/jobs/find_files.rb
#work ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/kmdb/jobs/find_files.rb', line 18 def work lookahead = Integer(ENV.fetch('KMDB_REVISION_LOOKAHEAD', 10)) start_at = Dumpfile.maximum(:revision) || Integer(ENV.fetch('KMDB_MIN_REVISION', 1)) start_at.upto(start_at + lookahead).map do |revision| json_file = JsonFile.new(revision) next unless json_file.exist? Resque.enqueue(ParseFile, json_file.revision) end end |