apm_package_reload_cmds (private)

 apm_package_reload_cmds files

Defined in packages/acs-tcl/tcl/apm-procs.tcl

Map filenames into reloading cmds. For every file, a loading command is appended to the result. The command might be empty.

Parameters:
files (required)
Returns:
list of Tcl cmds to be executed to load these files.

Partial Call Graph (max 5 caller/called nodes):
%3 apm_load_any_changed_libraries apm_load_any_changed_libraries (public) apm_package_reload_cmds apm_package_reload_cmds apm_load_any_changed_libraries->apm_package_reload_cmds ad_file ad_file (public) apm_package_reload_cmds->ad_file

Testcases:
No testcase defined.
Source code:
    set cmds {}
    if { [llength $files] > 0 } {
        ns_log Notice "apm_reload: Reloading *-procs.tcl amd .xql files in this interpreter..."
    }

    foreach file $files {
        set cmd {}
        #
        # If we haven't yet reloaded the file in this loop, source it.
        #
        if { ![info exists reloaded_files($file)] } {
            # File is usually of form packages/package_key
            set file_path "$::acs::rootdir/$file"
            set file_ext [ad_file extension $file_path]
            switch -- $file_ext {
                .tcl {
                    # Make sure this is not a -init.tcl file as those should only be sourced on server startup
                    if { ![string match "*-init.tcl" $file_path] } {
                        ns_log Notice "apm: Reloading $file..."
                        set cmd [list apm_source $file_path errors]
                    }
                }
                .xql {
                    ns_log Notice "apm: Reloading $file..."
                    set cmd [list db_qd_load_query_file $file_path errors]
                }
                default {
                    ns_log Notice "apm: File $file_path has unknown extension. Not reloading."
                }
            }
            set reloaded_files($file) 1
        }
        lappend cmds $cmd
    }
    return $cmds
Generic XQL file:
packages/acs-tcl/tcl/apm-procs.xql

PostgreSQL XQL file:
packages/acs-tcl/tcl/apm-procs-postgresql.xql

Oracle XQL file:
packages/acs-tcl/tcl/apm-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: