Properly configure our optional RunQueue.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2531 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -140,7 +140,7 @@ public class UserManager
|
|||||||
}
|
}
|
||||||
|
|
||||||
// register a cron job to prune the session table every hour
|
// register a cron job to prune the session table every hour
|
||||||
_pruner = new Interval(pruneQueue) {
|
_pruner = new Interval() {
|
||||||
@Override public void expired () {
|
@Override public void expired () {
|
||||||
try {
|
try {
|
||||||
_repository.pruneSessions();
|
_repository.pruneSessions();
|
||||||
@@ -149,6 +149,9 @@ public class UserManager
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
if (pruneQueue != null) {
|
||||||
|
_pruner.setRunQueue(pruneQueue);
|
||||||
|
}
|
||||||
_pruner.schedule(SESSION_PRUNE_INTERVAL, true);
|
_pruner.schedule(SESSION_PRUNE_INTERVAL, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user