Skip to content

Commit

Permalink
deprecated init
Browse files Browse the repository at this point in the history
  • Loading branch information
jxnu-liguobin committed Sep 27, 2023
1 parent d712af7 commit ccec41b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 3 additions & 0 deletions core/src/main/scala/zio/nebula/NebulaSessionClientLive.scala
Expand Up @@ -25,6 +25,9 @@ private[nebula] final class NebulaSessionClientLive(underlying: SessionPool) ext

override def close(): Task[Unit] = ZIO.attempt(underlying.close())

@deprecated(
"init the SessionPool this function is moved into SessionPool's constructor, no need to call it manually."
)
override def init(): Task[Boolean] = ZIO.attempt(underlying.init())

}
2 changes: 0 additions & 2 deletions core/src/test/scala/zio/nebula/NebulaClientSpec.scala
Expand Up @@ -40,8 +40,6 @@ object NebulaClientSpec extends NebulaSpec {
suite("nebula session pool")(
test("create and query") {
for {
init <- ZIO.serviceWithZIO[NebulaSessionClient](_.init())
_ <- ZIO.logInfo(s"init session: $init")
res1 <- ZIO.serviceWithZIO[NebulaSessionClient](_.execute(insertVertexes))
_ <- ZIO.logInfo(s"exec insert vertex: ${res1.errorMessage}")
res2 <- ZIO.serviceWithZIO[NebulaSessionClient](_.execute(insertEdges))
Expand Down
Expand Up @@ -16,8 +16,6 @@ object NebulaSessionClientExample {
object NebulaSessionClientMain extends ZIOAppDefault {

override def run = (for {
_ <- ZIO
.serviceWithZIO[NebulaSessionClient](_.init())
_ <- ZIO
.serviceWithZIO[NebulaSessionClientExample](
_.execute("""
Expand Down

0 comments on commit ccec41b

Please sign in to comment.