diff --git a/src/Redis.ts b/src/Redis.ts index da54d1ec6..c2baece2d 100644 --- a/src/Redis.ts +++ b/src/Redis.ts @@ -1,10 +1,10 @@ -import { Config, Context, Effect, flow, Inspectable, Layer, pipe, Runtime } from 'effect' +import { Config, Context, Effect, flow, Inspectable, Layer, pipe, Redacted, Runtime } from 'effect' import { Redis as IoRedis } from 'ioredis' -const makeRedis = (url: URL) => +const makeRedis = (url: Redacted.Redacted) => Effect.gen(function* () { const runtime = yield* Effect.runtime() - const redis = new IoRedis(url.href, { commandTimeout: 2 * 1000, enableAutoPipelining: true }) + const redis = new IoRedis(Redacted.value(url).href, { commandTimeout: 2 * 1000, enableAutoPipelining: true }) const runSync = Runtime.runSync(runtime) diff --git a/src/index.ts b/src/index.ts index 90d10ba50..0e05fa636 100644 --- a/src/index.ts +++ b/src/index.ts @@ -47,7 +47,7 @@ pipe( ), Effect.provideServiceEffect(GhostApi, Config.all({ key: Config.string('GHOST_API_KEY') })), Effect.provide(Nodemailer.layerConfig(Config.url('SMTP_URI'))), - Effect.provide(Redis.layerConfig(Config.url('REDIS_URI'))), + Effect.provide(Redis.layerConfig(Config.redacted(Config.url('REDIS_URI')))), Effect.provideServiceEffect( FetchHttpClient.Fetch, Effect.gen(function* () {