[sync] log files found
This commit is contained in:
parent
2153f109aa
commit
1982686e00
1 changed files with 11 additions and 8 deletions
|
@ -44,22 +44,25 @@ object Sync {
|
||||||
flatMap(recurseIntoSubDirectories)
|
flatMap(recurseIntoSubDirectories)
|
||||||
}
|
}
|
||||||
|
|
||||||
case class S3MetaData()
|
case class S3MetaData(localPath: Path)
|
||||||
|
|
||||||
private def enrichWithS3MetaData: Path => Stream[IO, S3MetaData] = path => {
|
private def enrichWithS3MetaData: Path => Stream[IO, S3MetaData] = path => Stream.eval(for {
|
||||||
|
_ <- putStrLn(s"enrich: $path")
|
||||||
// HEAD(bucket, prefix, relative(path))
|
// HEAD(bucket, prefix, relative(path))
|
||||||
// create blank S3MetaData records (sealed trait?)
|
// create blank S3MetaData records (sealed trait?)
|
||||||
}
|
} yield S3MetaData(localPath = path))
|
||||||
|
|
||||||
private def uploadRequiredFilter: S3MetaData => Stream[IO, Path] =
|
private def uploadRequiredFilter: S3MetaData => Stream[IO, Path] =
|
||||||
s3Metadata => {
|
s3Metadata => Stream.eval(for {
|
||||||
|
_ <- putStrLn(s"upload required: ${s3Metadata.localPath}")
|
||||||
//md5File(localFile)
|
//md5File(localFile)
|
||||||
//filter(localHash => options.force || localHash != metadataHash)
|
//filter(localHash => options.force || localHash != metadataHash)
|
||||||
}
|
} yield s3Metadata.localPath)
|
||||||
|
|
||||||
private def performUpload: Path => Stream[IO, Promise[Unit]] =
|
private def performUpload: Path => Stream[IO, Promise[Unit]] =
|
||||||
path => {
|
path => Stream.eval(for {
|
||||||
|
_ <- putStrLn(s"upload: $path")
|
||||||
// upload
|
// upload
|
||||||
IO.unit
|
p = Promise[Unit]()
|
||||||
}
|
} yield p)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue