Added STAT_CUTOFF compile flag

This commit is contained in:
Thulinma 2020-07-30 00:35:52 +02:00
parent b4b76850e3
commit ca63abae14
3 changed files with 17 additions and 1 deletions

View file

@ -89,6 +89,9 @@ endif()
if (DEFINED DATASIZE )
add_definitions(-DSHM_DATASIZE=${DATASIZE})
endif()
if (DEFINED STAT_CUTOFF )
add_definitions(-DSTAT_CUTOFF=${STAT_CUTOFF})
endif()
if (NOT DEFINED NOUPDATE )
add_definitions(-DUPDATER=1)
endif()

View file

@ -200,6 +200,14 @@ bool Util::Config::parseArgs(int &argc, char **&argv){
"names."
<< std::endl;
#endif
#ifdef STAT_CUTOFF
if (STAT_CUTOFF != 600){
std::cout << "- Setting: Stats cutoff point " << STAT_CUTOFF << " seconds. Statistics and session cache are only kept for this long, as opposed to the default of 600 seconds." << std::endl;
}
#endif
#ifndef SSL
std::cout << "- Flag: SSL support disabled. HTTPS/RTMPS are unavailable." << std::endl;
#endif
/*LTS-START*/
#ifndef UPDATER
std::cout << "- Flag: Updater disabled. Server will not call back home and attempt to search "
@ -213,7 +221,7 @@ bool Util::Config::parseArgs(int &argc, char **&argv){
#endif
#ifdef KILLONEXIT
std::cout << "- Flag: Kill on exit. All binaries will forcibly shut down all their children "
"on exit. This disabled rolling restart support."
"on exit. Rolling restart support is disabled."
<< std::endl;
#endif
#ifdef STATS_DELAY
@ -226,6 +234,9 @@ bool Util::Config::parseArgs(int &argc, char **&argv){
std::cout << "This makes them less accurate." << std::endl;
}
}
#endif
#ifndef LICENSING
std::cout << "- Flag: Licensing system disabled. No checks for validity will occur." << std::endl;
#endif
/*LTS-END*/
std::cout << "Built on " __DATE__ ", " __TIME__ << std::endl;

View file

@ -11,7 +11,9 @@
#include <string>
/// The STAT_CUTOFF define sets how many seconds of statistics history is kept.
#ifndef STAT_CUTOFF
#define STAT_CUTOFF 600
#endif
namespace Controller{