Branch: Tag:

2015-12-01

2015-12-01 17:47:49 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Core: Renamed the error log cleaning background process.

Made the name of the process more generic as the process can be useful
for other similar tasks.

520:    // Zap some of the remaining caches.    destruct(argcache);    destruct(cache); -  stop_error_log_cleaner(); +  stop_hourly_maintenance();   #ifdef THREADS   #if constant(Filesystem.Monitor.basic)    stop_fsgarb();
3226:    report_debug( s );   }    - protected BackgroundProcess error_log_cleaner_process; + protected BackgroundProcess hourly_maintenance_process;      protected void clean_error_log(mapping(string:array(int)) log,    mapping(string:int) cutoffs)
3268:    }   }    - protected void start_error_log_cleaner() + protected void hourly_maintenance()   { -  if (error_log_cleaner_process) return; +  error_log_cleaner(); + }    -  // Clean the error log once every hour. -  error_log_cleaner_process = BackgroundProcess(3600, error_log_cleaner); + protected void start_hourly_maintenance() + { +  if (hourly_maintenance_process) return; +  +  // Start a background process that performs maintenance tasks every hour +  // (eg cleaning the error log). +  hourly_maintenance_process = BackgroundProcess(3600, hourly_maintenance);   }    - protected void stop_error_log_cleaner() + protected void stop_hourly_maintenance()   { -  if (error_log_cleaner_process) { -  error_log_cleaner_process->stop(); -  error_log_cleaner_process = UNDEFINED; +  if (hourly_maintenance_process) { +  hourly_maintenance_process->stop(); +  hourly_maintenance_process = UNDEFINED;    }   }   
6167:   #endif   #endif /* THREADS */    -  start_error_log_cleaner(); +  start_hourly_maintenance();      #ifdef TEST_EUID_CHANGE    if (test_euid_change) {