Sha256: 015641d1f416e3eec2329554f7f76f6f75c89b854470035fc8833e6c367a29d4

Contents?: true

Size: 467 Bytes

Versions: 2

Compression:

Stored size: 467 Bytes

Contents

# -*- coding: utf-8 -*-

module Dcmgr::Models
  class RequestLog < BaseNew

    plugin :serialization
    serialize_attributes :yaml, :params

    def after_initialize
      super
      self[:request_id] ||= Isono::Util.gen_id
      t = Time.now
      self[:requested_at] = t
      self[:requested_at_usec] = t.usec
    end

    def before_create
      t = Time.now
      self[:responded_at] = t
      self[:responded_at_usec] = t.usec
      super
    end

  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
wakame-vdc-agents-11.12.0 lib/dcmgr/models/request_log.rb
wakame-vdc-dcmgr-11.12.0 lib/dcmgr/models/request_log.rb