Commit 9a660c9c authored by Julian Hochstetter's avatar Julian Hochstetter
Browse files

Task #3890: configurable cleanup delay

parent d74b6f57
......@@ -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>>();
......
......@@ -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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment