diff --git a/README.md b/README.md index 9aa3966d5..c9e90a66c 100644 --- a/README.md +++ b/README.md @@ -49,21 +49,19 @@ object ZIORedisExample extends ZIOAppDefault { def get[A: Schema]: BinaryCodec[A] = ProtobufCodec.protobufCodec } - val myApp: ZIO[Redis, RedisError, Unit] = for { - redis <- ZIO.service[Redis] - _ <- redis.set("myKey", 8L, Some(1.minutes)) - v <- redis.get("myKey").returning[Long] - _ <- Console.printLine(s"Value of myKey: $v").orDie - _ <- redis.hSet("myHash", ("k1", 6), ("k2", 2)) - _ <- redis.rPush("myList", 1, 2, 3, 4) - _ <- redis.sAdd("mySet", "a", "b", "a", "c") - } yield () - - override def run = myApp.provide( - Redis.layer, - SingleNodeExecutor.local, - ZLayer.succeed[CodecSupplier](ProtobufCodecSupplier) - ) + val myApp: ZIO[Redis, RedisError, Unit] = + for { + redis <- ZIO.service[Redis] + _ <- redis.set("myKey", 8L, Some(1.minutes)) + v <- redis.get("myKey").returning[Long] + _ <- Console.printLine(s"Value of myKey: $v").orDie + _ <- redis.hSet("myHash", ("k1", 6), ("k2", 2)) + _ <- redis.rPush("myList", 1, 2, 3, 4) + _ <- redis.sAdd("mySet", "a", "b", "a", "c") + } yield () + + override def run = + myApp.provide(Redis.local, ZLayer.succeed[CodecSupplier](ProtobufCodecSupplier)) } ``` @@ -108,9 +106,8 @@ object EmbeddedRedisSpec extends ZIOSpecDefault { } ).provideShared( EmbeddedRedis.layer, - SingleNodeExecutor.layer, ZLayer.succeed[CodecSupplier](ProtobufCodecSupplier), - Redis.layer + Redis.singleNode ) @@ TestAspect.silentLogging } ```