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
292 293 294 |
# File 'lib/bricolage/streamingload/job.rb', line 292 def disabled @disabled end |
#jobs ⇒ Object
Returns the value of attribute jobs
292 293 294 |
# File 'lib/bricolage/streamingload/job.rb', line 292 def jobs @jobs end |
#object_urls ⇒ Object
Returns the value of attribute object_urls
292 293 294 |
# File 'lib/bricolage/streamingload/job.rb', line 292 def object_urls @object_urls end |
#schema_name ⇒ Object
Returns the value of attribute schema_name
292 293 294 |
# File 'lib/bricolage/streamingload/job.rb', line 292 def schema_name @schema_name end |
#table_name ⇒ Object
Returns the value of attribute table_name
292 293 294 |
# File 'lib/bricolage/streamingload/job.rb', line 292 def table_name @table_name end |
#task_class ⇒ Object
Returns the value of attribute task_class
292 293 294 |
# File 'lib/bricolage/streamingload/job.rb', line 292 def task_class @task_class end |
#task_id ⇒ Object
Returns the value of attribute task_id
292 293 294 |
# File 'lib/bricolage/streamingload/job.rb', line 292 def task_id @task_id end |
Instance Method Details
#failure_count ⇒ Object
308 309 310 311 312 313 314 315 316 |
# File 'lib/bricolage/streamingload/job.rb', line 308 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
304 305 306 |
# File 'lib/bricolage/streamingload/job.rb', line 304 def fix_last_job_status(st) jobs.last.status = st unless jobs.empty? end |
#last_job_id ⇒ Object
299 300 301 302 |
# File 'lib/bricolage/streamingload/job.rb', line 299 def last_job_id return nil if jobs.empty? jobs.last.job_id end |
#unknown_state? ⇒ Boolean
294 295 296 297 |
# File 'lib/bricolage/streamingload/job.rb', line 294 def unknown_state? return false if jobs.empty? jobs.last.status == 'unknown' end |