提交 3325f1f7 编写于 作者: 梦境迷离's avatar 梦境迷离

update examples

上级 51f95352
......@@ -12,7 +12,7 @@ ThisBuild / resolvers ++= Seq(
lazy val scala212 = "2.12.14"
lazy val scala211 = "2.11.12"
lazy val scala213 = "2.13.8"
lazy val lastVersionForExamples = "0.4.0-SNAPSHOT"
lazy val lastVersionForExamples = "0.4.2"
lazy val commonSettings =
Seq(
......
......@@ -21,7 +21,7 @@
package org.bitlap.tools
import org.bitlap.cacheable.core.{ cacheable, Cache, LogUtils }
import org.bitlap.cacheable.core.{ cacheable, Cache, Utils }
import org.bitlap.cacheable.redis.Implicits._
import zio.{ ExitCode, UIO, URIO, ZIO }
import zio.console.putStrLn
......@@ -62,10 +62,10 @@ object CacheExample extends zio.App {
(for {
cache1 <- readStreamEntityFunction(1, "hello-world").runHead
cache2 <- updateStreamFunction(2, "helloworld").runHead
_ <- LogUtils.debug(s"${cache1.toString} ${cache2.toString}")
_ <- Utils.debug(s"${cache1.toString} ${cache2.toString}")
_ <- putStrLn("Hello good to meet you!")
} yield ()).foldM(
e => LogUtils.debug(s"error => $e").exitCode,
e => Utils.debug(s"error => $e").exitCode,
_ => UIO.effectTotal(ExitCode.success)
)
......
......@@ -22,7 +22,7 @@
package org.bitlap.tools
import scala.util.Random
import org.bitlap.cacheable.core.{ Cache, LogUtils }
import org.bitlap.cacheable.core.{ Cache, Utils }
import org.bitlap.cacheable.caffeine.Implicits._
import zio.console.putStrLn
import zio.stream.ZStream
......@@ -62,10 +62,10 @@ object CacheExample extends zio.App {
(for {
cache1 <- readStreamEntityFunction(1, "hello-world").runHead
cache2 <- updateStreamFunction(2, "helloworld").runHead
_ <- LogUtils.debug(s"${cache1.toString} ${cache2.toString}")
_ <- Utils.debug(s"${cache1.toString} ${cache2.toString}")
_ <- putStrLn("Hello good to meet you!")
} yield ()).foldM(
e => LogUtils.debug(s"error => $e").exitCode,
e => Utils.debug(s"error => $e").exitCode,
_ => UIO.effectTotal(ExitCode.success)
)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册