hub (unreleased): a box cannot mint operator events — only a queued job is told as refused, the give-up list is bounded (R-1383); docs for the clock-step fix and HSTS (R-1395, R-1050)
gates / gates (push) Successful in 2m3s
gates / gates (push) Successful in 2m3s
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
1 parent
1886030782
commit
186f3fca58
11 files changed
+184
-14
No files matched your search
@@ -3797,10 +3797,22 @@ func (s *Store) CountSignedJobs(hostID string) (int, error) {
|
||||
// calls it after executing OR terminally rejecting a job. Idempotent (deleting an absent job is a
|
||||
// no-op, returns nil) — a retried completion must not error.
|
||||
func (s *Store) DeleteSignedJob(hostID, jobID string) error {
|
||||
_, err := s.db.Exec(`DELETE FROM signed_jobs WHERE host_id = ? AND job_id = ?`, hostID, jobID)
|
||||
_, err := s.DeleteSignedJobN(hostID, jobID)
|
||||
return err
|
||||
}
|
||||
|
||||
// DeleteSignedJobN is DeleteSignedJob that also says how many rows left the queue (0 = the job was not there). The
|
||||
// hub records how a job ended only for a job that WAS queued (R-1383): a box must not be able to mint events by
|
||||
// „clearing” job ids it invents.
|
||||
func (s *Store) DeleteSignedJobN(hostID, jobID string) (int64, error) {
|
||||
res, err := s.db.Exec(`DELETE FROM signed_jobs WHERE host_id = ? AND job_id = ?`, hostID, jobID)
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
n, _ := res.RowsAffected()
|
||||
return n, nil
|
||||
}
|
||||
|
||||
// ---- slice 10D: DR capstone (recovery mode, DR bundle, re-enroll) ----------------------------
|
||||
|
||||
// SetRecoveryMode arms recovery mode for a host until `until` (the operator toggle; bounded
|
||||
|
||||
Reference in new issue
Block a user