summaryrefslogtreecommitdiffstats
path: root/dozentenmodulserver
diff options
context:
space:
mode:
authorSimon Rettberg2024-01-22 13:54:08 +0100
committerSimon Rettberg2024-01-22 13:54:08 +0100
commit868a18188a40d18cd8209b6a231c7e1fd3ed62c3 (patch)
tree23c0ca2fe7bf6a3405f6658a2292aaa69ce2abc7 /dozentenmodulserver
parentCommit to force CI run (diff)
downloadtutor-module-868a18188a40d18cd8209b6a231c7e1fd3ed62c3.tar.gz
tutor-module-868a18188a40d18cd8209b6a231c7e1fd3ed62c3.tar.xz
tutor-module-868a18188a40d18cd8209b6a231c7e1fd3ed62c3.zip
[server] "using old data" message is confusing, only show if >= 1d
Diffstat (limited to 'dozentenmodulserver')
-rw-r--r--dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/thrift/cache/CacheBase.java4
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;