Class: Rafflesia::JobCleanupData

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/jobs/job_cleanup_data.rb

Constant Summary collapse

HASH_ATTRS =
{
  deleted_terminal_count: :deleted_terminal_count,
  dry_run: :dry_run,
  limit: :limit,
  marked_failed_count: :marked_failed_count,
  reference_at: :reference_at,
  stale_candidate_job_ids: :stale_candidate_job_ids,
  stale_cutoff_at: :stale_cutoff_at,
  terminal_candidate_job_ids: :terminal_candidate_job_ids,
  terminal_cutoff_at: :terminal_cutoff_at
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ JobCleanupData

Returns a new instance of JobCleanupData.



31
32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/rafflesia/jobs/job_cleanup_data.rb', line 31

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @deleted_terminal_count = hash[:deleted_terminal_count]
  @dry_run = hash[:dry_run]
  @limit = hash[:limit]
  @marked_failed_count = hash[:marked_failed_count]
  @reference_at = hash[:reference_at]
  @stale_candidate_job_ids = (hash[:stale_candidate_job_ids] || [])
  @stale_cutoff_at = hash[:stale_cutoff_at]
  @terminal_candidate_job_ids = (hash[:terminal_candidate_job_ids] || [])
  @terminal_cutoff_at = hash[:terminal_cutoff_at]
end

Instance Attribute Details

#deleted_terminal_countObject

Returns the value of attribute deleted_terminal_count.



20
21
22
# File 'lib/rafflesia/jobs/job_cleanup_data.rb', line 20

def deleted_terminal_count
  @deleted_terminal_count
end

#dry_runObject

Returns the value of attribute dry_run.



20
21
22
# File 'lib/rafflesia/jobs/job_cleanup_data.rb', line 20

def dry_run
  @dry_run
end

#limitObject

Returns the value of attribute limit.



20
21
22
# File 'lib/rafflesia/jobs/job_cleanup_data.rb', line 20

def limit
  @limit
end

#marked_failed_countObject

Returns the value of attribute marked_failed_count.



20
21
22
# File 'lib/rafflesia/jobs/job_cleanup_data.rb', line 20

def marked_failed_count
  @marked_failed_count
end

#reference_atObject

Returns the value of attribute reference_at.



20
21
22
# File 'lib/rafflesia/jobs/job_cleanup_data.rb', line 20

def reference_at
  @reference_at
end

#stale_candidate_job_idsObject

Returns the value of attribute stale_candidate_job_ids.



20
21
22
# File 'lib/rafflesia/jobs/job_cleanup_data.rb', line 20

def stale_candidate_job_ids
  @stale_candidate_job_ids
end

#stale_cutoff_atObject

Returns the value of attribute stale_cutoff_at.



20
21
22
# File 'lib/rafflesia/jobs/job_cleanup_data.rb', line 20

def stale_cutoff_at
  @stale_cutoff_at
end

#terminal_candidate_job_idsObject

Returns the value of attribute terminal_candidate_job_ids.



20
21
22
# File 'lib/rafflesia/jobs/job_cleanup_data.rb', line 20

def terminal_candidate_job_ids
  @terminal_candidate_job_ids
end

#terminal_cutoff_atObject

Returns the value of attribute terminal_cutoff_at.



20
21
22
# File 'lib/rafflesia/jobs/job_cleanup_data.rb', line 20

def terminal_cutoff_at
  @terminal_cutoff_at
end