mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 04:27:29 +00:00
remove console.log and add redis to /status api
This commit is contained in:
@@ -1062,7 +1062,6 @@ export const expandSecrets = async (
|
|||||||
|
|
||||||
Object.keys(secrets).forEach((key) => {
|
Object.keys(secrets).forEach((key) => {
|
||||||
if (secrets[key].value.match(INTERPOLATION_SYNTAX_REG)) {
|
if (secrets[key].value.match(INTERPOLATION_SYNTAX_REG)) {
|
||||||
console.log("KEY that matches ====>", key)
|
|
||||||
interpolatedSec[key] = secrets[key].value;
|
interpolatedSec[key] = secrets[key].value;
|
||||||
} else {
|
} else {
|
||||||
expandedSec[key] = secrets[key].value;
|
expandedSec[key] = secrets[key].value;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ type TSyncSecretsToThirdPartyServices = {
|
|||||||
environment?: string
|
environment?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export const syncSecretsToThirdPartyServices = new Queue('sync-secrets-to-third-party-services', process.env.REDIS_URL as string);
|
export const syncSecretsToThirdPartyServices = new Queue("sync-secrets-to-third-party-services", process.env.REDIS_URL as string);
|
||||||
|
|
||||||
syncSecretsToThirdPartyServices.process(async (job: Job) => {
|
syncSecretsToThirdPartyServices.process(async (job: Job) => {
|
||||||
const { workspaceId, environment }: TSyncSecretsToThirdPartyServices = job.data
|
const { workspaceId, environment }: TSyncSecretsToThirdPartyServices = job.data
|
||||||
@@ -57,7 +57,7 @@ syncSecretsToThirdPartyServices.process(async (job: Job) => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
syncSecretsToThirdPartyServices.on("error", (error) => {
|
syncSecretsToThirdPartyServices.on("error", (error) => {
|
||||||
console.log("QUEUE ERROR:", error)
|
console.log("QUEUE ERROR:", error) // eslint-disable-line
|
||||||
})
|
})
|
||||||
|
|
||||||
export const syncSecretsToActiveIntegrationsQueue = (jobDetails: TSyncSecretsToThirdPartyServices) => {
|
export const syncSecretsToActiveIntegrationsQueue = (jobDetails: TSyncSecretsToThirdPartyServices) => {
|
||||||
@@ -65,7 +65,7 @@ export const syncSecretsToActiveIntegrationsQueue = (jobDetails: TSyncSecretsToT
|
|||||||
attempts: 5,
|
attempts: 5,
|
||||||
backoff: {
|
backoff: {
|
||||||
type: "exponential",
|
type: "exponential",
|
||||||
delay: 1000
|
delay: 3000
|
||||||
},
|
},
|
||||||
removeOnComplete: true,
|
removeOnComplete: true,
|
||||||
removeOnFail: {
|
removeOnFail: {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import express, { Request, Response } from "express";
|
import express, { Request, Response } from "express";
|
||||||
import { getInviteOnlySignup, getSecretScanningGitAppId, getSecretScanningPrivateKey, getSecretScanningWebhookSecret, getSmtpConfigured } from "../../config";
|
import { getInviteOnlySignup, getRedisUrl, getSecretScanningGitAppId, getSecretScanningPrivateKey, getSecretScanningWebhookSecret, getSmtpConfigured } from "../../config";
|
||||||
|
|
||||||
const router = express.Router();
|
const router = express.Router();
|
||||||
|
|
||||||
@@ -11,7 +11,8 @@ router.get(
|
|||||||
message: "Ok",
|
message: "Ok",
|
||||||
emailConfigured: await getSmtpConfigured(),
|
emailConfigured: await getSmtpConfigured(),
|
||||||
secretScanningConfigured: await getSecretScanningGitAppId() && await getSecretScanningWebhookSecret() && await getSecretScanningPrivateKey(),
|
secretScanningConfigured: await getSecretScanningGitAppId() && await getSecretScanningWebhookSecret() && await getSecretScanningPrivateKey(),
|
||||||
inviteOnlySignup: await getInviteOnlySignup()
|
inviteOnlySignup: await getInviteOnlySignup(),
|
||||||
|
redisConfigured: await getRedisUrl() !== "" && await getRedisUrl() !== undefined
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user