lib/dor/workflow_archiver.rb
def archive
      objs = find_completed_objects

      if objs.none?
        LyberCore::Log.info 'Nothing to archive'
      else
        LyberCore::Log.info "Found #{objs.count} completed workflows"
        archiving_criteria = map_result_to_criteria(objs)
        archive_rows(archiving_criteria)

        LyberCore::Log.info "DONE! Processed #{@archived.to_s} objects with #{@errors.to_s} errors" if @errors < 3
      end
    end
# Does the work of finding completed objects and archiving the rows
Does the work of finding completed objects and archiving the rows
Does the work of finding completed objects and archiving the rows
def archive
      objs = find_completed_objects
      if objs.none?
        LyberCore::Log.info 'Nothing to archive'
      else
        LyberCore::Log.info "Found #{objs.count} completed workflows"
        archiving_criteria = map_result_to_criteria(objs)
        archive_rows(archiving_criteria)
        LyberCore::Log.info "DONE! Processed #{@archived.to_s} objects with #{@errors.to_s} errors" if @errors < 3
      end
    end
def archive objs = find_completed_objects if objs . none? LyberCore :: Log . info 'Nothing to archive' else LyberCore :: Log . info "Found #{objs.count} completed workflows" archiving_criteria = map_result_to_criteria ( objs ) archive_rows ( archiving_criteria ) LyberCore :: Log . info "DONE! Processed #{@archived.to_s} objects with #{@errors.to_s} errors" if @errors < 3 end end
Does the work of finding completed objects and archiving the rows
Does the work of finding completed objects and archiving the rows