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:
parent
efd12733ee
commit
e441d8bafb
4 changed files with 11 additions and 12 deletions
|
@ -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()
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
kobalt.version=0.401
|
||||
kobalt.version.check_timeout=P1DT2H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue