Add Session cleaning

pull/3099/head
Isaac Connor 2020-12-08 10:21:55 -05:00
parent 691f9a70f9
commit b0f2ff6302
1 changed files with 3 additions and 0 deletions

View File

@ -91,6 +91,9 @@ while( 1 ) {
}
} # 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});
} # end while (1)