Skip to content
This repository has been archived by the owner on Jul 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #320 from Uconnect-Technologies/dev-ilyas/redis
Browse files Browse the repository at this point in the history
Dev ilyas/redis
  • Loading branch information
ilyaskarim authored Dec 20, 2021
2 parents 16e8a08 + 892ef99 commit acb267e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/framework/helpers/pause.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const pause = function (timeout = 1000) {
return new Promise((resolve, reject) => {
try {
setTimeout(() => {
resolve()
resolve(true)
}, timeout)
} catch (e) {
reject(e)
Expand Down
2 changes: 1 addition & 1 deletion src/next/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { emailSender } from "./mailer/index"
import http from "http"
import { WertikConfiguration } from "./types"
import { WertikApp } from "./types"
import { ConfigurationServicePlaceholders } from "aws-sdk/lib/config_service_placeholders"

export * from "./database"
export * from "./modules/modules"
Expand All @@ -19,6 +18,7 @@ export * from "./cronJobs"
export * from "./storage"
export * from "./helpers/modules/backup"
export * from "./sockets"
export * from "./redis"

const Wertik: (configuration: WertikConfiguration) => Promise<WertikApp> = (
configuration: WertikConfiguration
Expand Down
6 changes: 4 additions & 2 deletions src/next/redis/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ export const useRedis = (props?: useRedisProps) => {
}) => {
const client = createClient(props)
await client.connect()
client.on("error", (err) => console.log("Redis Client Error ", err))
console.log(`[REDIS]`, `Initialized redis ${props.name}`)
client.on("error", (err) =>
console.log(`Redis Client ${props.name} Error `, err)
)
console.log(`[Redis]`, `Initialized redis "${props.name}"`)
return client
}
}

0 comments on commit acb267e

Please sign in to comment.