mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 00:27:11 +01:00
redis checkpoint
This commit is contained in:
parent
10cc6616c5
commit
818f8721e9
10 changed files with 187 additions and 34 deletions
|
|
@ -23,7 +23,7 @@ function logQuery(e) {
|
|||
console.log(chalk.yellow(e.params), '->', e.query, chalk.greenBright(`${e.duration}ms`));
|
||||
}
|
||||
|
||||
function getPrismaClient(options) {
|
||||
function getClient(options) {
|
||||
const prisma = new PrismaClient(options);
|
||||
|
||||
if (process.env.LOG_QUERY) {
|
||||
|
|
@ -32,7 +32,7 @@ function getPrismaClient(options) {
|
|||
|
||||
return prisma;
|
||||
}
|
||||
const prisma = global.prisma || getPrismaClient(options);
|
||||
const prisma = global.prisma || getClient(options);
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
global.prisma = prisma;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue