Class: Bricolage::StreamingLoad::Job::ControlConnection::TaskInfo
- Inherits:
-
Struct
- Object
- Struct
- Bricolage::StreamingLoad::Job::ControlConnection::TaskInfo
- Defined in:
- lib/bricolage/streamingload/job.rb,
lib/bricolage/streamingload/job.rb
Instance Attribute Summary collapse
-
#disabled ⇒ Object
Returns the value of attribute disabled.
-
#jobs ⇒ Object
Returns the value of attribute jobs.
-
#object_urls ⇒ Object
Returns the value of attribute object_urls.
-
#schema_name ⇒ Object
Returns the value of attribute schema_name.
-
#table_name ⇒ Object
Returns the value of attribute table_name.
-
#task_class ⇒ Object
Returns the value of attribute task_class.
-
#task_id ⇒ Object
Returns the value of attribute task_id.
Instance Method Summary collapse
- #failure_count ⇒ Object
- #fix_last_job_status(st) ⇒ Object
- #last_job_id ⇒ Object
- #unknown_state? ⇒ Boolean
Instance Attribute Details
#disabled ⇒ Object
Returns the value of attribute disabled
268 269 270 |
# File 'lib/bricolage/streamingload/job.rb', line 268 def disabled @disabled end |
#jobs ⇒ Object
Returns the value of attribute jobs
268 269 270 |
# File 'lib/bricolage/streamingload/job.rb', line 268 def jobs @jobs end |
#object_urls ⇒ Object
Returns the value of attribute object_urls
268 269 270 |
# File 'lib/bricolage/streamingload/job.rb', line 268 def object_urls @object_urls end |
#schema_name ⇒ Object
Returns the value of attribute schema_name
268 269 270 |
# File 'lib/bricolage/streamingload/job.rb', line 268 def schema_name @schema_name end |
#table_name ⇒ Object
Returns the value of attribute table_name
268 269 270 |
# File 'lib/bricolage/streamingload/job.rb', line 268 def table_name @table_name end |
#task_class ⇒ Object
Returns the value of attribute task_class
268 269 270 |
# File 'lib/bricolage/streamingload/job.rb', line 268 def task_class @task_class end |
#task_id ⇒ Object
Returns the value of attribute task_id
268 269 270 |
# File 'lib/bricolage/streamingload/job.rb', line 268 def task_id @task_id end |
Instance Method Details
#failure_count ⇒ Object
284 285 286 287 288 289 290 291 292 |
# File 'lib/bricolage/streamingload/job.rb', line 284 def failure_count @failure_count ||= begin statuses = jobs.map(&:status) statuses.delete('duplicated') last_succ = statuses.rindex('success') statuses[0..last_succ] = [] if last_succ statuses.size end end |
#fix_last_job_status(st) ⇒ Object
280 281 282 |
# File 'lib/bricolage/streamingload/job.rb', line 280 def fix_last_job_status(st) jobs.last.status = st unless jobs.empty? end |
#last_job_id ⇒ Object
275 276 277 278 |
# File 'lib/bricolage/streamingload/job.rb', line 275 def last_job_id return nil if jobs.empty? jobs.last.job_id end |
#unknown_state? ⇒ Boolean
270 271 272 273 |
# File 'lib/bricolage/streamingload/job.rb', line 270 def unknown_state? return false if jobs.empty? jobs.last.status == 'unknown' end |