Sign part 2

This commit is contained in:
alexey
2025-03-21 23:15:46 +03:00
parent c6a89e7be1
commit e6d3a90231
17 changed files with 485 additions and 12 deletions

View File

@@ -235,7 +235,7 @@ class DBase
#result = 0 (in progress), 1 (stopped - error), 2 (stopped - success)
def create_build_task(prj_id, git_id, proj_path)
id = BuildTask.insert(repo_id: git_id.to_i, proj_id: prj_id.to_i, signpath: "", logpath: "", errlogpath: "", result: 0)
id = BuildTask.insert(repo_id: git_id.to_i, proj_id: prj_id.to_i, logpath: "", errlogpath: "", result: 0)
@last_id = id
BuildTask.where(id: id).update(logpath: File.join(proj_path, "#{id}"), errlogpath: File.join(proj_path, "#{id}", "process.log"))
end
@@ -359,4 +359,16 @@ class DBase
def projects_with_current_as_link(prj_id)
ProjectsProjects.where(proj_id_repository: prj_id.to_i).all
end
def get_rpm_info_by_hash(hash)
Rpms.where(filehash: hash).first
end
def update_rpm_sign(rpm_id, sign_path)
Rpms.where(id: rpm_id.to_i).update(sign: 1, signpath: sign_path)
end
def set_project_address(prj_id, address)
ProjectsProjects.where(proj_id: prj_id.to_i).update(remote_address: address)
end
end