Class: Tasker::Types::GraphMetadata

Inherits:
Dry::Struct
  • Object
show all
Defined in:
lib/tasker/types/dependency_graph.rb

Overview

Metadata about the overall dependency graph

Examples:

Template graph metadata

 = GraphMetadata.new(
  graph_type: 'template',
  handler_name: 'order_processing',
  total_nodes: 5,
  total_edges: 4
)

Runtime graph metadata

 = GraphMetadata.new(
  graph_type: 'runtime',
  task_id: '12345',
  total_nodes: 5,
  total_edges: 4,
  execution_context: {
    ready_steps: 2,
    blocked_steps: 1,
    completed_steps: 2
  }
)

Instance Attribute Summary collapse

Instance Attribute Details

#additional_data ⇒ Hash (readonly)

Returns Additional graph metadata.

Returns:

  • (Hash) —

    Additional graph metadata



178
# File 'lib/tasker/types/dependency_graph.rb', line 178

attribute :additional_data, Types::Hash.default({}.freeze)

#execution_context ⇒ Hash? (readonly)

Returns Runtime execution information.

Returns:

  • (Hash, nil) —

    Runtime execution information



172
# File 'lib/tasker/types/dependency_graph.rb', line 172

attribute? :execution_context, Types::Hash.optional

#graph_type ⇒ String (readonly)

Returns Graph type.

Returns:

  • (String) —

    Graph type



142
# File 'lib/tasker/types/dependency_graph.rb', line 142

attribute :graph_type, Types::String

#handler_name ⇒ String? (readonly)

Returns Task handler name.

Returns:

  • (String, nil) —

    Task handler name



148
# File 'lib/tasker/types/dependency_graph.rb', line 148

attribute? :handler_name, Types::String.optional

#task_id ⇒ String? (readonly)

Returns Task identifier.

Returns:

  • (String, nil) —

    Task identifier



154
# File 'lib/tasker/types/dependency_graph.rb', line 154

attribute? :task_id, Types::String.optional

#total_edges ⇒ Integer (readonly)

Returns Edge count.

Returns:

  • (Integer) —

    Edge count



166
# File 'lib/tasker/types/dependency_graph.rb', line 166

attribute :total_edges, Types::Integer

#total_nodes ⇒ Integer (readonly)

Returns Node count.

Returns:

  • (Integer) —

    Node count



160
# File 'lib/tasker/types/dependency_graph.rb', line 160

attribute :total_nodes, Types::Integer