apm_mark_files_for_reload (public)

 apm_mark_files_for_reload [ -force_reload ] file_list

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

Mark the given list of Tcl and query files for reload in all interpreters. Only marks files for reload if they haven't been loaded before or they have changed since last reload.

Switches:
-force_reload (optional, boolean)
Mark the files for reload even if their modification time in the nsv cache doesn't differ from the one in the filesystem.
Parameters:
file_list (required)
A list of paths relative to $::acs::rootdir
Returns:
The list of files marked for reload.
Author:
Peter Marklund

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_sc_impl_new_from_spec acs_sc_impl_new_from_spec (test acs-service-contract) apm_mark_files_for_reload apm_mark_files_for_reload test_acs_sc_impl_new_from_spec->apm_mark_files_for_reload ad_file ad_file (public) apm_mark_files_for_reload->ad_file acs_sc::impl::binding::init_procs acs_sc::impl::binding::init_procs (private) acs_sc::impl::binding::init_procs->apm_mark_files_for_reload apm_mark_version_for_reload apm_mark_version_for_reload (public) apm_mark_version_for_reload->apm_mark_files_for_reload

Testcases:
acs_sc_impl_new_from_spec
Source code:
    set changed_files [list]
    foreach relative_path $file_list {
        set full_path "$::acs::rootdir/$relative_path"

        # If the file exists, and either has never been loaded or has an mtime
        # which differs the mtime it had when last loaded, mark to be loaded.
        if { [ad_file isfile $full_path] } {
            set mtime [ad_file mtime $full_path]
            if { $force_reload_p
                 || (![nsv_exists apm_library_mtime $relative_path]
                     || [nsv_get apm_library_mtime $relative_path] != $mtime
                     || [clock seconds]-$mtime < 5) } {
                lappend changed_files $relative_path
            }
        }
    }

    if {$::apm::reloading eq "classic"} {
        if { [llength $changed_files] > 0 } {
            set reload [nsv_incr apm_properties reload_level]
            nsv_set apm_reload $reload $changed_files
        }
    }

    return $changed_files
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: