fixed normal checking/cleaning periods

This commit is contained in:
csoler 2021-01-06 23:09:50 +01:00
parent c3988e986f
commit ce4a0de6df
2 changed files with 7 additions and 3 deletions

View File

@ -59,8 +59,8 @@ static const uint32_t INDEX_AUTHEN_IDENTITY = 0x00000010; // identity
static const uint32_t INDEX_AUTHEN_PUBLISH = 0x00000020; // publish key static const uint32_t INDEX_AUTHEN_PUBLISH = 0x00000020; // publish key
static const uint32_t INDEX_AUTHEN_ADMIN = 0x00000040; // admin key static const uint32_t INDEX_AUTHEN_ADMIN = 0x00000040; // admin key
static const uint32_t MSG_CLEANUP_PERIOD = 60*5; // 59 minutes static const uint32_t MSG_CLEANUP_PERIOD = 60*59; // 59 minutes
static const uint32_t INTEGRITY_CHECK_PERIOD = 60*3; // 31 minutes static const uint32_t INTEGRITY_CHECK_PERIOD = 60*31; // 31 minutes
#define GXS_MASK "GXS_MASK_HACK" #define GXS_MASK "GXS_MASK_HACK"

View File

@ -41,7 +41,7 @@
static const uint32_t MAX_GXS_IDS_REQUESTS_NET = 10 ; // max number of requests from cache/net (avoids killing the system!) static const uint32_t MAX_GXS_IDS_REQUESTS_NET = 10 ; // max number of requests from cache/net (avoids killing the system!)
#define DEBUG_GXSUTIL 1 // #define DEBUG_GXSUTIL 1
#ifdef DEBUG_GXSUTIL #ifdef DEBUG_GXSUTIL
#define GXSUTIL_DEBUG() std::cerr << "[" << time(NULL) << "] : GXS_UTIL : " << __FUNCTION__ << " : " #define GXSUTIL_DEBUG() std::cerr << "[" << time(NULL) << "] : GXS_UTIL : " << __FUNCTION__ << " : "
@ -170,7 +170,9 @@ bool RsGxsCleanUp::clean(RsGxsGroupId& next_group_to_check,std::vector<RsGxsGrou
if(it->first == next_group_to_check) if(it->first == next_group_to_check)
{ {
#ifdef DEBUG_GXSUTIL
GXSUTIL_DEBUG() << "Had the time to test all groups. Will start again at " << it->first << std::endl; GXSUTIL_DEBUG() << "Had the time to test all groups. Will start again at " << it->first << std::endl;
#endif
full_round = true; full_round = true;
break; break;
} }
@ -182,7 +184,9 @@ bool RsGxsCleanUp::clean(RsGxsGroupId& next_group_to_check,std::vector<RsGxsGrou
//if(tm > now + 1) // we spent more than 1 sec on the job already //if(tm > now + 1) // we spent more than 1 sec on the job already
if(tm > now) // we spent more than 1 sec on the job already if(tm > now) // we spent more than 1 sec on the job already
{ {
#ifdef DEBUG_GXSUTIL
GXSUTIL_DEBUG() << "Aborting cleanup because it took too much time already. Next group left to be " << it->first << std::endl; GXSUTIL_DEBUG() << "Aborting cleanup because it took too much time already. Next group left to be " << it->first << std::endl;
#endif
next_group_to_check = it->first; next_group_to_check = it->first;
full_round = false; full_round = false;
break; break;