pike.git / lib / modules / Search.pmod / Utils.pmod

version» Context lines:

pike.git/lib/modules/Search.pmod/Utils.pmod:1:   // This file is part of Roxen Search   // Copyright © 2001 Roxen IS. All rights reserved.   // - // $Id: Utils.pmod,v 1.36 2003/01/27 15:10:09 mattias Exp $ + // $Id: Utils.pmod,v 1.37 2003/01/31 11:55:05 mattias Exp $      #if !constant(report_error)   #define report_error werror   #define report_debug werror   #define report_warning werror   #endif      #ifdef SEARCH_DEBUG   # define WERR(X) report_debug("search: "+(X)+"\n");   #else
pike.git/lib/modules/Search.pmod/Utils.pmod:465:    int would_be_indexed = time() + latency*60;    foreach(profiles, int profile)    crawl_queue[profile] = 0;    WERR("New entry. time: "+(would_be_indexed-time())+" profiles: "+(array(string))profiles*",");    if(next_run && next_run<would_be_indexed && next_run>=time())    return;    next_run = would_be_indexed;    reschedule();    }    -  private void reschedule() { -  remove_call_out(do_scheduled_stuff); -  WERR("Scheduler runs next event in "+(next_run-time())+" seconds."); -  call_out(do_scheduled_stuff, next_run-time()); -  } -  -  void unschedule() { -  remove_call_out(do_scheduled_stuff); -  } -  +     void schedule() {    crawl_queue = ([]);    compact_queue = ([]);       foreach(indices(db_profiles), int id) {    object dbp = db_profiles[id];    if(!dbp) {    report_warning("Search database profile %d destructed.\n", id);    m_delete(db_profiles, id);    continue;