Class: Rafflesia::JobProgress

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/foundry/job_progress.rb

Constant Summary collapse

HASH_ATTRS =
{
  failures: :failures,
  files_discovered: :files_discovered,
  files_parsed: :files_parsed,
  objects_produced: :objects_produced,
  rows_written: :rows_written,
  shards_processed: :shards_processed,
  table_artifacts: :table_artifacts
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ JobProgress

Returns a new instance of JobProgress.



27
28
29
30
31
32
33
34
35
36
37
# File 'lib/rafflesia/foundry/job_progress.rb', line 27

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @failures = hash[:failures]
  @files_discovered = hash[:files_discovered]
  @files_parsed = hash[:files_parsed]
  @objects_produced = hash[:objects_produced]
  @rows_written = hash[:rows_written]
  @shards_processed = hash[:shards_processed]
  @table_artifacts = hash[:table_artifacts]
end

Instance Attribute Details

#failuresObject

Returns the value of attribute failures.



18
19
20
# File 'lib/rafflesia/foundry/job_progress.rb', line 18

def failures
  @failures
end

#files_discoveredObject

Returns the value of attribute files_discovered.



18
19
20
# File 'lib/rafflesia/foundry/job_progress.rb', line 18

def files_discovered
  @files_discovered
end

#files_parsedObject

Returns the value of attribute files_parsed.



18
19
20
# File 'lib/rafflesia/foundry/job_progress.rb', line 18

def files_parsed
  @files_parsed
end

#objects_producedObject

Returns the value of attribute objects_produced.



18
19
20
# File 'lib/rafflesia/foundry/job_progress.rb', line 18

def objects_produced
  @objects_produced
end

#rows_writtenObject

Returns the value of attribute rows_written.



18
19
20
# File 'lib/rafflesia/foundry/job_progress.rb', line 18

def rows_written
  @rows_written
end

#shards_processedObject

Returns the value of attribute shards_processed.



18
19
20
# File 'lib/rafflesia/foundry/job_progress.rb', line 18

def shards_processed
  @shards_processed
end

#table_artifactsObject

Returns the value of attribute table_artifacts.



18
19
20
# File 'lib/rafflesia/foundry/job_progress.rb', line 18

def table_artifacts
  @table_artifacts
end