Branch: Tag:

2017-11-07

2017-11-07 10:55:33 by Anders Johansson <anders@roxen.com>

Core: Scan for certs in a handler thread

284:    // Zap some of the remaining caches.    destruct(argcache);    destruct(cache); +  stop_scan_certs();    stop_hourly_maintenance();   #ifdef THREADS   #if constant(Filesystem.Monitor.basic)
6292:    }    }    CertDB.refresh_all_pem_files(force); + }    -  call_out(scan_certs, 600); // Scan for new certs every 10 minutes. + protected BackgroundProcess scan_certs_process; +  + // Start a background process that scan for new certs every 10 minutes. + protected void start_scan_certs() + { +  if (scan_certs_process) return; +  +  scan_certs_process = BackgroundProcess(600, scan_certs);   }    -  + protected void stop_scan_certs() + { +  if (scan_certs_process) { +  scan_certs_process->stop(); +  scan_certs_process = UNDEFINED; +  } + }      protected class GCTimestamp   {
6824:   #endif   #endif /* THREADS */    +  start_scan_certs();    start_hourly_maintenance();      #ifdef TEST_EUID_CHANGE