Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtisassad committed Oct 11, 2024
1 parent 16ae3cc commit 7df491b
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions scripts/redisScript.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {config} from 'packages/commonwealth/server/config.js';
import {createClient, RedisClientOptions} from 'redis';
import { config } from 'packages/commonwealth/server/config.js';
import { createClient } from 'redis';

const redis_url = config.CACHE.REDIS_URL;
const CONNECT_TIMEOUT = 5000;
Expand All @@ -24,15 +24,11 @@ if (redis_url.includes('rediss')) {

const client = createClient(redisOptions);

this.client.on('ready', () =>
console.log(`RedisCache connection ready`),
);
this.client.on('reconnecting', () =>
console.log(`RedisCache reconnecting...`),
);
this.client.on('ready', () => console.log(`RedisCache connection ready`));
this.client.on('reconnecting', () => console.log(`RedisCache reconnecting...`));
this.client.on('end', () => console.log(`RedisCache disconnected`));
this.client.on('error', (err: Error) => {
this.client.on('error', (err) => {
console.log(err.message, err);
});

void this.client.connect();
void this.client.connect();

0 comments on commit 7df491b

Please sign in to comment.