Module: RRRSpec::Server::LogFilePersister

Extended by:
ActiveSupport::Concern
Included in:
Persistence::Slave, Persistence::Taskset, Persistence::Trial, Persistence::WorkerLog
Defined in:
lib/rrrspec/server/log_file_persister.rb

Overview

LogFilePersister

class Taskset < ActiveRecord::Base
  include LogFilePersister
  save_as_file :log, suffix: 'log'
end

Requirements:

  • Have a property named ‘key’

  • Set RRRSpec.configuration.execute_log_text_path

  • Have a singleton method :after_save

Provides:

  • Methods named ‘log’, ‘log=’, ‘log_log_path’.

  • ‘after_save’ hook that persists a log to the file pointed by log_log_path.

  • Persist the value of the ‘log’ to File.join(execute_log_text_path, “#‘_’).gsub(/:/, ‘/’)_log.log”) if it is dirty.

Defined Under Namespace

Modules: ClassMethods