diff options
author | Simon Rettberg | 2024-01-22 13:54:08 +0100 |
---|---|---|
committer | Simon Rettberg | 2024-01-22 13:54:08 +0100 |
commit | 868a18188a40d18cd8209b6a231c7e1fd3ed62c3 (patch) | |
tree | 23c0ca2fe7bf6a3405f6658a2292aaa69ce2abc7 | |
parent | Commit to force CI run (diff) | |
download | tutor-module-868a18188a40d18cd8209b6a231c7e1fd3ed62c3.tar.gz tutor-module-868a18188a40d18cd8209b6a231c7e1fd3ed62c3.tar.xz tutor-module-868a18188a40d18cd8209b6a231c7e1fd3ed62c3.zip |
[server] "using old data" message is confusing, only show if >= 1d
-rw-r--r-- | dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/cache/CacheBase.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/cache/CacheBase.java b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/cache/CacheBase.java index ffc92d4e..8b701111 100644 --- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/cache/CacheBase.java +++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/cache/CacheBase.java @@ -79,8 +79,8 @@ public abstract class CacheBase<T> { ok = localLatch.await(waitTime, TimeUnit.SECONDS); } catch (InterruptedException e) { } - if (!ok) { - LOGGER.warn("CacheUpdate for " + getClass().getSimpleName() + " timed out, using old data."); + if (!ok && (System.currentTimeMillis() - cacheTimeout) > 86400_000) { + LOGGER.warn("CacheUpdate for " + getClass().getSimpleName() + " timed out, using old data from >= 1 day ago."); } synchronized (this) { return cachedInstance; |