Class: Kaltura::KalturaSchedulerWorker

Inherits:
KalturaObjectBase show all
Defined in:
lib/kaltura_types.rb

Instance Attribute Summary collapse

Attributes inherited from KalturaObjectBase

#object_type, #related_objects

Instance Method Summary collapse

Methods inherited from KalturaObjectBase

#camelcase, #to_b, #to_params

Instance Attribute Details

#avg_waitObject

Avarage time between creation and queue time



5433
5434
5435
# File 'lib/kaltura_types.rb', line 5433

def avg_wait
  @avg_wait
end

#avg_workObject

Avarage time between queue time end finish time



5435
5436
5437
# File 'lib/kaltura_types.rb', line 5435

def avg_work
  @avg_work
end

#configsObject

Array of the last configs



5429
5430
5431
# File 'lib/kaltura_types.rb', line 5429

def configs
  @configs
end

#configured_idObject

The id as configured in the batch config



5415
5416
5417
# File 'lib/kaltura_types.rb', line 5415

def configured_id
  @configured_id
end

#idObject

The id of the Worker



5413
5414
5415
# File 'lib/kaltura_types.rb', line 5413

def id
  @id
end

#last_statusObject

last status time



5437
5438
5439
# File 'lib/kaltura_types.rb', line 5437

def last_status
  @last_status
end

#last_status_strObject

last status formated



5439
5440
5441
# File 'lib/kaltura_types.rb', line 5439

def last_status_str
  @last_status_str
end

#locked_jobsObject

Array of jobs that locked to this worker



5431
5432
5433
# File 'lib/kaltura_types.rb', line 5431

def locked_jobs
  @locked_jobs
end

#nameObject

The scheduler name



5425
5426
5427
# File 'lib/kaltura_types.rb', line 5425

def name
  @name
end

#scheduler_configured_idObject

The id of the scheduler as configured in the batch config



5419
5420
5421
# File 'lib/kaltura_types.rb', line 5419

def scheduler_configured_id
  @scheduler_configured_id
end

#scheduler_idObject

The id of the Scheduler



5417
5418
5419
# File 'lib/kaltura_types.rb', line 5417

def scheduler_id
  @scheduler_id
end

#statusesObject

Array of the last statuses



5427
5428
5429
# File 'lib/kaltura_types.rb', line 5427

def statuses
  @statuses
end

#typeObject

The worker type



5421
5422
5423
# File 'lib/kaltura_types.rb', line 5421

def type
  @type
end

#type_nameObject

The friendly name of the type



5423
5424
5425
# File 'lib/kaltura_types.rb', line 5423

def type_name
  @type_name
end

Instance Method Details

#from_xml(xml_element) ⇒ Object



5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
# File 'lib/kaltura_types.rb', line 5463

def from_xml(xml_element)
  super
  if xml_element.elements['id'] != nil
    self.id = xml_element.elements['id'].text
  end
  if xml_element.elements['configuredId'] != nil
    self.configured_id = xml_element.elements['configuredId'].text
  end
  if xml_element.elements['schedulerId'] != nil
    self.scheduler_id = xml_element.elements['schedulerId'].text
  end
  if xml_element.elements['schedulerConfiguredId'] != nil
    self.scheduler_configured_id = xml_element.elements['schedulerConfiguredId'].text
  end
  if xml_element.elements['type'] != nil
    self.type = xml_element.elements['type'].text
  end
  if xml_element.elements['typeName'] != nil
    self.type_name = xml_element.elements['typeName'].text
  end
  if xml_element.elements['name'] != nil
    self.name = xml_element.elements['name'].text
  end
  if xml_element.elements['statuses'] != nil
    self.statuses = KalturaClientBase.object_from_xml(xml_element.elements['statuses'], 'KalturaSchedulerStatus')
  end
  if xml_element.elements['configs'] != nil
    self.configs = KalturaClientBase.object_from_xml(xml_element.elements['configs'], 'KalturaSchedulerConfig')
  end
  if xml_element.elements['lockedJobs'] != nil
    self.locked_jobs = KalturaClientBase.object_from_xml(xml_element.elements['lockedJobs'], 'KalturaBatchJob')
  end
  if xml_element.elements['avgWait'] != nil
    self.avg_wait = xml_element.elements['avgWait'].text
  end
  if xml_element.elements['avgWork'] != nil
    self.avg_work = xml_element.elements['avgWork'].text
  end
  if xml_element.elements['lastStatus'] != nil
    self.last_status = xml_element.elements['lastStatus'].text
  end
  if xml_element.elements['lastStatusStr'] != nil
    self.last_status_str = xml_element.elements['lastStatusStr'].text
  end
end