All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.colisweb.zio.gdrive.client.Retry.scala Maven / Gradle / Ivy

The newest version!
package com.colisweb.zio.gdrive.client

import zio.{Schedule, Task, ZIO}

class Retry(retryPolicy: Schedule[Any, Throwable, Any]) {
  def apply[A](computation: => A): Task[A] =
    ZIO
      .attempt(computation)
      .tapError(e => ZIO.logWarning(s"error occurred in google-drive-scala : ${e.toString}"))
      .retry(retryPolicy)
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy