Class: Ml::Candidate
Constant Summary
AtomicInternalId::MissingValueError
ApplicationRecord::MAX_PLUCK
ResetOnUnionError::MAX_RESET_PERIOD
Class Method Summary
collapse
Instance Method Summary
collapse
group_init, #internal_id_read_scope, #internal_id_scope_attrs, #internal_id_scope_usage, namespace_init, project_init, scope_attrs, scope_usage
cached_column_list, #create_or_load_association, declarative_enum, default_select_columns, id_in, id_not_in, iid_in, pluck_primary_key, primary_key_in, #readable_by?, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, #to_ability_name, underscore, where_exists, where_not_exists, with_fast_read_statement_timeout, without_order
#serializable_hash
Class Method Details
.with_project_id_and_eid(project_id, eid) ⇒ Object
77
78
79
80
81
|
# File 'app/models/ml/candidate.rb', line 77
def with_project_id_and_eid(project_id, eid)
return unless project_id.present? && eid.present?
find_by(project_id: project_id, eid: eid)
end
|
.with_project_id_and_iid(project_id, iid) ⇒ Object
83
84
85
86
87
|
# File 'app/models/ml/candidate.rb', line 83
def with_project_id_and_iid(project_id, iid)
return unless project_id.present? && iid.present?
find_by(project_id: project_id, internal_id: iid)
end
|
Instance Method Details
#artifact_root ⇒ Object
64
65
66
|
# File 'app/models/ml/candidate.rb', line 64
def artifact_root
"/#{package_name}/#{package_version}/"
end
|
#from_ci? ⇒ Boolean
72
73
74
|
# File 'app/models/ml/candidate.rb', line 72
def from_ci?
ci_build_id.present?
end
|
#package_version ⇒ Object
68
69
70
|
# File 'app/models/ml/candidate.rb', line 68
def package_version
iid
end
|