Roxen.git / server / base_server / roxen.pike

version» Context lines:

Roxen.git/server/base_server/roxen.pike:4884:       void do_cleanup( )    {    // Flushes may be costly in large sites (at least the OPTIMIZE TABLE    // command) so schedule next run sometime after 04:30 the day after    // tomorrow.    //    // Note: The OPTIMIZE TABLE step has been disabled. /mast    int now = time();    mapping info = localtime(now); -  int wait = (int) ((24 - info->hour) + 24 + 4.5) * 3600 + random(500); +  int wait = (int) (((24 - info->hour) + 24 + 4.5) % 24) * 3600 + random(500);    background_run(wait, do_cleanup);       // Remove items older than one week    flush(now - 7 * 3600 * 24);    }       void create( string id, function draw_func )    //! Instantiate an image cache of your own, whose image files will    //! be stored in a table `id' in the cache mysql database,    //!