diff --git a/src/main/java/de/thm/arsnova/services/SessionService.java b/src/main/java/de/thm/arsnova/services/SessionService.java index 55a22c3ef5cf006dad2cfb1580befe195cad4286..accb4cd24f7431f1b6c19e06270a38e431dc0fa6 100644 --- a/src/main/java/de/thm/arsnova/services/SessionService.java +++ b/src/main/java/de/thm/arsnova/services/SessionService.java @@ -64,6 +64,12 @@ public class SessionService implements ISessionService { @Autowired ARSnovaSocketIOServer server; + /** + * minutes, after which the feedback is deleted + */ + @Value("${feedback.cleanup}") + private int cleanupFeedbackDelay; + private String databaseHost; private int databasePort; private String databaseName; @@ -98,7 +104,7 @@ public class SessionService implements ISessionService { @Override @Scheduled(fixedDelay=5000) public void cleanFeedbackVotes() { - final long timelimitInMillis = /*10 * 60 **/ 10000; + final long timelimitInMillis = 60000 * cleanupFeedbackDelay; final long maxAllowedTimeInMillis = System.currentTimeMillis() - timelimitInMillis; Map<String, Set<String>> affectedUsers = new HashMap<String, Set<String>>(); diff --git a/src/main/webapp/arsnova.properties.example b/src/main/webapp/arsnova.properties.example index 5042b97f53891874e9de056924dbaef1330a124f..9133b8352291e8fbb63804c3c61b7d469cdff06f 100644 --- a/src/main/webapp/arsnova.properties.example +++ b/src/main/webapp/arsnova.properties.example @@ -14,6 +14,9 @@ security.ssl=false security.keystore=/etc/arsnova.thm.de.jks security.storepass=arsnova +# minutes, after which the feedback is deleted +feedback.cleanup=10 + couchdb.host=localhost couchdb.port=5984 couchdb.name=arsnova \ No newline at end of file