Update public source

This commit is contained in:
2026-10-09 04:57:25 +03:00
parent 5fd4a39c72
commit f5bb815a0e
4 changed files with 544 additions and 6 deletions
+28
View File
@@ -48,6 +48,34 @@ class JobIssuanceService:
self._reservations = ReservationsRepository(conn)
self._audit = AuditRepository(conn)
def get_method_statistics(
self,
method_id: str,
method_version: int,
) -> dict[str, int]:
row = self._handshakes.get_method_statistics(
method_id,
method_version,
)
total_count = int(row["total_count"] or 0)
found_count = int(row["found_count"] or 0)
covered_count = int(row["covered_count"] or 0)
reserved_count = int(row["reserved_count"] or 0)
return {
"total_count": total_count,
"found_count": found_count,
"covered_count": covered_count,
"reserved_count": reserved_count,
"available_count": (
total_count
- found_count
- covered_count
- reserved_count
),
}
def issue_job(
self,
method_id: str,