fix: redis url
This commit is contained in:
Родитель
870de69cbc
Коммит
593d689b25
2
.env
2
.env
|
@ -80,7 +80,7 @@ PRODUCT_PROMOS_ENABLED=1
|
|||
# Experiment Flag
|
||||
EXPERIMENT_ACTIVE=0
|
||||
|
||||
REDIS_URL=redis-mock
|
||||
REDIS_URL=redis://redis.mock
|
||||
|
||||
SUPPORTED_LOCALES=cak,cs,cy,da,de,el,en,en-CA,en-GB,es-AR,es-CL,es-ES,es-MX,fi,fr,fy-NL,gn,hu,kab,ia,id,it,ja,nb-NO,nl,nn-NO,pt-BR,pt-PT,ro,ru,sk,sl,sq,sv-SE,tr,uk,vi,zh-CN,zh-TW
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ AWS_SECRET_ACCESS_KEY=
|
|||
|
||||
ADMINS=youraddress@mozilla.com,youraddress+anotheraccount@mozilla.com
|
||||
DATABASE_URL="postgres://blurts:blurts@localhost:5432/blurts"
|
||||
REDIS_URL=redis-mock
|
||||
REDIS_URL=redis://redis.mock
|
||||
|
||||
# Set these to be able to run end-to-end tests locally
|
||||
E2E_TEST_ACCOUNT_EMAIL=
|
||||
|
|
|
@ -63,7 +63,7 @@ jobs:
|
|||
NEXTAUTH_URL: ${{ secrets.NEXTAUTH_URL }}
|
||||
HIBP_KANON_API_TOKEN: ${{ secrets.HIBP_KANON_API_TOKEN }}
|
||||
HIBP_API_TOKEN: ${{ secrets.HIBP_API_TOKEN }}
|
||||
REDIS_URL: "redis-mock"
|
||||
REDIS_URL: "redis://redis.mock"
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: always()
|
||||
with:
|
||||
|
|
|
@ -85,7 +85,7 @@ jobs:
|
|||
# Our tests are currently set up to expect accounts to act like
|
||||
# old user accounts, so let's pretend they all are:
|
||||
BROKER_SCAN_RELEASE_DATE: "3000-12-31"
|
||||
REDIS_URL: "redis-mock"
|
||||
REDIS_URL: "redis://redis.mock"
|
||||
- uses: actions/upload-artifact@v4
|
||||
if: always()
|
||||
with:
|
||||
|
|
|
@ -10,7 +10,7 @@ import type { Redis } from "ioredis";
|
|||
let cached: Redis;
|
||||
|
||||
export const redisClient = () => {
|
||||
if (process.env.REDIS_URL?.includes("redis-mock")) {
|
||||
if (process.env.REDIS_URL?.includes("redis.mock")) {
|
||||
cached = createRedisMockInstance();
|
||||
logger.info("redis_mock_client_created_success");
|
||||
} else {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
const url = new URL(process.env.REDIS_URL || "");
|
||||
export const redisConfiguration = {
|
||||
host: url.hostname || "redis-mock",
|
||||
host: url.hostname || "redis.mock",
|
||||
password: url.password || "",
|
||||
port: Number(url.port) || 6379,
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче