Sha256: 354fa75b945f1ea0a5cc60469bcf1fdb654c427c22a77ca7414fad5e50cd074b

Contents?: true

Size: 351 Bytes

Versions: 4

Compression:

Stored size: 351 Bytes

Contents

module Rivendell::Import
  class Tasks

    def pop
      Task.pending.first
    end

    def run
      Task.pending.find_each(&:run)
    end

    def create(file, &block)
      Rivendell::Import::Task.create({:file => file}, {}, &block).tap do |task|
        Rivendell::Import.logger.debug "Created task #{task.inspect}"
      end
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rivendell-import-0.0.5 lib/rivendell/import/tasks.rb
rivendell-import-0.0.4 lib/rivendell/import/tasks.rb
rivendell-import-0.0.3 lib/rivendell/import/tasks.rb
rivendell-import-0.0.2 lib/rivendell/import/tasks.rb