update function redis.createClient to use redis host+port from config/settings.json otherwise redis use default host (localhost) and default port (6379)

)
This commit is contained in:
Benjamin Brauner 2024-02-29 10:36:16 +01:00
parent 80d4bdbfef
commit 25e619a4f6
4 changed files with 17 additions and 8 deletions

View File

@ -11,9 +11,11 @@ logger.info('Running bbb-export-annotations');
(async () => { (async () => {
const client = redis.createClient({ const client = redis.createClient({
host: config.redis.host,
port: config.redis.port,
password: config.redis.password, password: config.redis.password,
socket: {
host: config.redis.host,
port: config.redis.port
}
}); });
await client.connect(); await client.connect();

View File

@ -25,9 +25,11 @@ const jobType = exportJob.jobType;
async function collectAnnotationsFromRedis() { async function collectAnnotationsFromRedis() {
const client = redis.createClient({ const client = redis.createClient({
host: config.redis.host,
port: config.redis.port,
password: config.redis.password, password: config.redis.password,
socket: {
host: config.redis.host,
port: config.redis.port
}
}); });
client.on('error', (err) => logger.info('Redis Client Error', err)); client.on('error', (err) => logger.info('Redis Client Error', err));

View File

@ -20,9 +20,11 @@ const exportJob = JSON.parse(job);
* sending a message through Redis PubSub */ * sending a message through Redis PubSub */
async function notifyMeetingActor() { async function notifyMeetingActor() {
const client = redis.createClient({ const client = redis.createClient({
host: config.redis.host,
port: config.redis.port,
password: config.redis.password, password: config.redis.password,
socket: {
host: config.redis.host,
port: config.redis.port
}
}); });
await client.connect(); await client.connect();

View File

@ -794,9 +794,11 @@ function overlay_annotations(svg, currentSlideAnnotations) {
// Process the presentation pages and annotations into a PDF file // Process the presentation pages and annotations into a PDF file
async function process_presentation_annotations() { async function process_presentation_annotations() {
const client = redis.createClient({ const client = redis.createClient({
host: config.redis.host,
port: config.redis.port,
password: config.redis.password, password: config.redis.password,
socket: {
host: config.redis.host,
port: config.redis.port
}
}); });
await client.connect(); await client.connect();
@ -873,6 +875,7 @@ async function process_presentation_annotations() {
SVGfile, SVGfile,
'--output-width', to_px(slideWidth), '--output-width', to_px(slideWidth),
'--output-height', to_px(slideHeight), '--output-height', to_px(slideHeight),
'-u',
'-o', PDFfile, '-o', PDFfile,
]; ];