apm_version_load_status (public)
apm_version_load_status version_id
Defined in packages/acs-tcl/tcl/apm-procs.tcl
If a version needs to be reloaded (i.e., a
-procs.tcl
has changed or been added since the version was loaded), returns "needs_reload". If the version has never been loaded, returns "never_loaded". If the version is up-to-date, returns "up_to_date".
- Parameters:
- version_id (required)
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: # See if the version was ever loaded. if { ![apm_package_version_enabled_p $version_id] } { return "never_loaded" } set package_key [apm_package_key_from_version_id $version_id] set procs_types [list tcl_procs] if { [apm_load_tests_p] } { lappend procs_types test_procs } foreach file [apm_get_package_files -package_key $package_key -file_types $procs_types] { # If $file has never been loaded, i.e., it has been added to the version # since the version was initially loaded, return needs_reload. if { ![nsv_exists apm_library_mtime "packages/$package_key/$file"] } { return "needs_reload" } set full_path "[acs_package_root_dir $package_key]/$file" # If $file had a different mtime when it was last loaded, return # needs_reload. (If the file should exist but doesn't, just skip it.) if { [ad_file exists $full_path] && [ad_file mtime $full_path] ne [nsv_get apm_library_mtime "packages/$package_key/$file"] } { return "needs_reload" } } foreach file [apm_get_package_files -package_key $package_key -file_types "query_file"] { # If $file has never been loaded, i.e., it has been added to the version # since the version was initially loaded, return needs_reload. if { ![nsv_exists apm_library_mtime "packages/$package_key/$file"] } { return "needs_reload" } set full_path "[acs_package_root_dir $package_key]/$file" # If $file had a different mtime when it was last loaded, return # needs_reload. (If the file should exist but doesn't, just skip it.) if { [ad_file exists $full_path] && [ad_file mtime $full_path] ne [nsv_get apm_library_mtime "packages/$package_key/$file"] } { return "needs_reload" } } return "up_to_date"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