1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-27 08:38:13 -07:00

Minor fixes to the Daniil's timeout checks.

This commit is contained in:
Cedric Beust 2016-01-29 22:59:53 +04:00
parent efd12733ee
commit e441d8bafb
4 changed files with 11 additions and 12 deletions

View file

@ -33,9 +33,9 @@ public class UpdateKobalt @Inject constructor(val github: GithubApi, val wrapper
* Accepts Future<String> as `latestVersionFuture` to allow getting `latestVersion` in the background
* */
fun checkForNewVersion(latestVersionFuture: Future<String>) {
if(Kobalt.versionCheckTimeout
> Duration.between(VersionCheckTimestampFile.getTimestamp(), Instant.now()))
if (Kobalt.versionCheckTimeout > Duration.between(VersionCheckTimestampFile.timestamp, Instant.now())) {
return // waits `Kobalt.versionCheckTimeout` before the next check
}
try {
val latestVersionString = latestVersionFuture.get()

View file

@ -1,2 +1 @@
kobalt.version=0.401
kobalt.version.check_timeout=P1DT2H