feat: 实现公平捞瓶和领取租约

This commit is contained in:
root
2026-09-15 13:56:56 +08:00
parent 969a10d664
commit 69fc8d51ce
23 changed files with 1221 additions and 20 deletions
+15
View File
@@ -25,6 +25,21 @@ import { PrismaService } from "../database/prisma.service.js";
import { bootstrap, configureApp } from "../main.js";
import { HealthService } from "./health.service.js";
process.env.NODE_ENV = "test";
process.env.WEB_ORIGIN = "http://localhost:3000";
process.env.PHONE_ENCRYPTION_KEY =
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
process.env.PHONE_HMAC_KEY = "health-phone-hmac-key-with-at-least-32-bytes";
process.env.VERIFICATION_CODE_HMAC_KEY =
"health-code-hmac-key-with-at-least-32-bytes";
process.env.REFRESH_TOKEN_HMAC_KEY =
"health-refresh-hmac-key-with-at-least-32-bytes";
process.env.LEASE_TOKEN_HMAC_KEY =
"health-lease-hmac-key-with-at-least-32-bytes";
process.env.LEASE_TOKEN_ENCRYPTION_KEY =
"BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB=";
process.env.JWT_SECRET = "health-jwt-secret-with-at-least-thirty-two-bytes";
type RedisClientDouble = EventEmitter & {
isOpen: boolean;
connect: ReturnType<typeof vi.fn>;