Roxen.git / server / base_server / fsgc.pike

version» Context lines:

Roxen.git/server/base_server/fsgc.pike:506:    int next_start = getvar("fsgc_starttime")->get_next(0);    int next_stop = getvar("fsgc_stoptime")->get_next(0);       if (next_start < 0) {    // FSGC Disabled    GC_WERR("FSGC: Disabled.\n");    } else if (next_start < next_stop) {    // FSGC Not allowed to run now.    // Sleep until next start time, but max 5 minutes    // at a time in case the settings are changed. -  max_sleep = next_start - time(1); -  if (max_sleep > 300) { -  max_sleep = 300; -  } +  max_sleep = limit(0, next_start - time(1), max_sleep);    } else {    // FSGC Allowed to run.    max_sleep = 60;    foreach(fsgarbs; string id; FSGarb g) {    int seconds = g && g->check();    if (seconds < max_sleep) max_sleep = seconds;    }    if (max_sleep < 1) max_sleep = 1;    }    GC_WERR("FSGC: Sleeping %d seconds...\n", max_sleep);