Add Session cleaning
parent
691f9a70f9
commit
b0f2ff6302
|
@ -91,6 +91,9 @@ while( 1 ) {
|
||||||
}
|
}
|
||||||
} # end if ZM_LOG_DATABASE_LIMIT
|
} # end if ZM_LOG_DATABASE_LIMIT
|
||||||
|
|
||||||
|
# Delete any sessions that are more ethan a week old. Limiting to 100 because mysql sucks
|
||||||
|
zmDbDo('DELETE FROM Sessions WHERE access < ? LIMIT 100', time - (60*60*24*7));
|
||||||
|
|
||||||
sleep($Config{ZM_STATS_UPDATE_INTERVAL});
|
sleep($Config{ZM_STATS_UPDATE_INTERVAL});
|
||||||
} # end while (1)
|
} # end while (1)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue