2024-03-12 19:27:50 +01:00
|
|
|
// import { Queue } from "bullmq";
|
2023-11-11 03:36:06 +01:00
|
|
|
import { PrismaClient } from "@prisma/client";
|
2024-03-11 03:04:14 +01:00
|
|
|
import { ConfigManager } from "config-manager";
|
2023-09-11 05:31:08 +02:00
|
|
|
|
2024-03-11 03:04:14 +01:00
|
|
|
const config = await new ConfigManager({}).getConfig();
|
2023-09-11 05:31:08 +02:00
|
|
|
|
2023-11-11 03:36:06 +01:00
|
|
|
const client = new PrismaClient({
|
|
|
|
|
datasourceUrl: `postgresql://${config.database.username}:${config.database.password}@${config.database.host}:${config.database.port}/${config.database.database}`,
|
|
|
|
|
});
|
|
|
|
|
|
2024-03-12 19:27:50 +01:00
|
|
|
/* const federationQueue = new Queue("federation", {
|
2023-11-27 02:40:44 +01:00
|
|
|
connection: {
|
|
|
|
|
host: config.redis.queue.host,
|
2023-11-27 06:53:13 +01:00
|
|
|
port: Number(config.redis.queue.port),
|
|
|
|
|
password: config.redis.queue.password || undefined,
|
2023-11-27 06:30:57 +01:00
|
|
|
db: config.redis.queue.database || undefined,
|
2023-11-27 02:40:44 +01:00
|
|
|
},
|
2024-03-12 19:27:50 +01:00
|
|
|
}); */
|
2023-11-27 02:40:44 +01:00
|
|
|
|
2024-03-12 19:27:50 +01:00
|
|
|
export { client /* federationQueue */ };
|