search-init.tcl


Procedures in this file

Detailed information

search::init::schedule_indexer (private)

 search::init::schedule_indexer

Schedule the indexer if the search package has been instantiated (indexing doesn't work if it hasn't been, so why should we schedule it?).

Partial Call Graph (max 5 caller/called nodes):
%3 packages/search/tcl/search-init.tcl packages/search/ tcl/search-init.tcl search::init::schedule_indexer search::init::schedule_indexer packages/search/tcl/search-init.tcl->search::init::schedule_indexer search::install::after_instantiate search::install::after_instantiate (private) search::install::after_instantiate->search::init::schedule_indexer ad_schedule_proc ad_schedule_proc (public) search::init::schedule_indexer->ad_schedule_proc apm_flush_package_id_cache apm_flush_package_id_cache (public) search::init::schedule_indexer->apm_flush_package_id_cache apm_package_id_from_key apm_package_id_from_key (public) search::init::schedule_indexer->apm_package_id_from_key parameter::get parameter::get (public) search::init::schedule_indexer->parameter::get

Testcases:
No testcase defined.
[ hide source ] | [ make this the default ]

Content File Source

namespace eval search {}
namespace eval search::init {}

#
# The nsv "search_static_variables" is for Oracle only.
#
if { [ns_config "ns/db/drivers" oracle] ne "" } {    
    nsv_set search_static_variables item_counter 0
}

ad_proc -private search::init::schedule_indexer {} {

    Schedule the indexer if the search package has been instantiated
    (indexing doesn't work if it hasn't been, so why should we
    schedule it?).

} {
    #
    # Flush cache to avoid forcing the user to restart their server
    # after mounting search.
    #
    apm_flush_package_id_cache search
    set package_id [apm_package_id_from_key search]
    if { $package_id != 0 } {
        ad_schedule_proc \
            -thread t [parameter::get \
                          -package_id $package_id \
                          -parameter SearchIndexerInterval \
                          -default 60 ] \
            search::indexer
    }
}

search::init::schedule_indexer

# Local variables:
#    mode: tcl
#    tcl-indent-level: 4
#    indent-tabs-mode: nil
# End: