Sha256: 4809ee4e2944f6159890efa6b01328d9cb486f0a088612be6ad7f55f1f63d57f

Contents?: true

Size: 672 Bytes

Versions: 3

Compression:

Stored size: 672 Bytes

Contents

# -*- coding: utf-8 -*-
require 'tengine/job/template'

# 処理を意味するVertex。実際に実行を行うTengine::Job::Scriptやジョブネットである
# Tengine::Job::Template::Jobnetの継承元である。
class Tengine::Job::Template::NamedVertex < Tengine::Job::Template::Vertex

  field :name, :type => String # ジョブの名称。

  validates :name, :presence => true

  # リソース識別子を返します
  def name_as_resource
    @name_as_resource ||= "job:#{Tengine::Event.host_name}/#{Process.pid.to_s}/#{root.id.to_s}/#{id.to_s}"
  end

  def short_inspect
    "#<%%%-30s id: %s name: %s>" % [self.class.name, self.id.to_s, name]
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tengine_job-1.2.2 lib/tengine/job/template/named_vertex.rb
tengine_job-1.2.1 lib/tengine/job/template/named_vertex.rb
tengine_job-1.2.0 lib/tengine/job/template/named_vertex.rb