Fix ACME renew infinit loop

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2025-12-15 16:43:28 +01:00
parent 345957af59
commit 32e7936737
4 changed files with 104 additions and 378 deletions

View File

@@ -203,7 +203,7 @@ LIMIT 1
return nil
}
func (cd *CustomDomain) LoadByIDForUpdate(
func (cd *CustomDomain) LoadByIDForUpdateSkipLocked(
ctx context.Context,
conn pg.Conn,
scope Scoper,
@@ -234,7 +234,7 @@ WHERE
%s
AND id = @id
LIMIT 1
FOR UPDATE
FOR UPDATE SKIP LOCKED
`
q = fmt.Sprintf(q, scope.SQLFragment())
@@ -565,7 +565,6 @@ FROM
WHERE
%s
AND ssl_status = @status
AND ssl_expires_at IS NOT NULL
AND ssl_expires_at <= CURRENT_TIMESTAMP + INTERVAL '30 days'
ORDER BY
ssl_expires_at ASC