mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
fix(nginx): use findAllBy and remove LIMIT_MAX when fetching certs for disk write jobs
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import LIMIT_MAX from "Common/Types/Database/LimitMax";
|
||||
import { EVERY_FIFTEEN_MINUTE, EVERY_MINUTE } from "Common/Utils/CronTime";
|
||||
import { IsDevelopment } from "Common/Server/EnvironmentConfig";
|
||||
import AcmeCertificateService from "Common/Server/Services/AcmeCertificateService";
|
||||
@@ -19,14 +18,13 @@ export default class Jobs {
|
||||
// Fetch all domains where certs are added to greenlock.
|
||||
|
||||
const certs: Array<AcmeCertificate> =
|
||||
await AcmeCertificateService.findBy({
|
||||
await AcmeCertificateService.findAllBy({
|
||||
query: {},
|
||||
select: {
|
||||
domain: true,
|
||||
certificate: true,
|
||||
certificateKey: true,
|
||||
},
|
||||
limit: LIMIT_MAX,
|
||||
skip: 0,
|
||||
props: {
|
||||
isRoot: true,
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import LIMIT_MAX from "Common/Types/Database/LimitMax";
|
||||
import { EVERY_FIFTEEN_MINUTE, EVERY_MINUTE } from "Common/Utils/CronTime";
|
||||
import { IsDevelopment } from "Common/Server/EnvironmentConfig";
|
||||
import StatusPageDomainService from "Common/Server/Services/StatusPageDomainService";
|
||||
@@ -20,7 +19,7 @@ export default class Jobs {
|
||||
// Fetch all domains where certs are added to greenlock.
|
||||
|
||||
const statusPageDomains: Array<StatusPageDomain> =
|
||||
await StatusPageDomainService.findBy({
|
||||
await StatusPageDomainService.findAllBy({
|
||||
query: {
|
||||
isCustomCertificate: true,
|
||||
customCertificate: QueryHelper.notNull(),
|
||||
@@ -31,7 +30,6 @@ export default class Jobs {
|
||||
customCertificate: true,
|
||||
customCertificateKey: true,
|
||||
},
|
||||
limit: LIMIT_MAX,
|
||||
skip: 0,
|
||||
props: {
|
||||
isRoot: true,
|
||||
|
||||
Reference in New Issue
Block a user