acs-content-repository-procs.tcl

tcl/acs-content-repository-procs.tcl patch a patch to the cr for handling the deleting revision's files when the revision has been deleted from the database Walter McGinnis (wtem@olywa.net), 2001-09-23 based on original photo-album package code by Tom Baginski JCD 2002-12-96 This should be fixed since on oracle anyway, being in a transaction does not mean that you get read level consistency across queries. End result is that someone can do an insert into the delete list and the delete_files query will whack it and the file will then never be deleted. Oops.

Location:
packages/acs-content-repository/tcl/acs-content-repository-procs.tcl

Procedures in this file

Detailed information

acs_cr_scheduled_release_exec (private)

 acs_cr_scheduled_release_exec

This was handled by oracle, but since other dbs, such as PostgreSQL don't support job submission, the job scheduling has been moved to aolserver. (OpenACS - DanW)

Partial Call Graph (max 5 caller/called nodes):
%3 db_exec_plsql db_exec_plsql (public) acs_cr_scheduled_release_exec acs_cr_scheduled_release_exec acs_cr_scheduled_release_exec->db_exec_plsql

Testcases:
No testcase defined.

cr_check_orphaned_files (private, deprecated)

 cr_check_orphaned_files [ -delete ] [ -mtime mtime ]
Deprecated. Invoking this procedure generates a warning.

Check for orphaned files in the content repository directory, and delete such files if required. Orphaned files might be created, when files are added to the content repository, but the transaction is being aborted. This function is intended to be used for one-time maintenance operations. Starting with 5.8.1, OpenACS contains support for handling orphaned files much more efficiently via a transaction log that is checked via cr_cleanup_orphaned_files in cr_delete_scheduled_files.

Switches:
-delete (optional, boolean)
delete the orphaned files
-mtime (optional)
same semantics as mtime in the file command
Author:
gustaf.neumann@wu-wien.ac.at

Partial Call Graph (max 5 caller/called nodes):
%3 ad_log_deprecated ad_log_deprecated (public) cr_count_file_entries cr_count_file_entries (private) util::which util::which (public) cr_check_orphaned_files cr_check_orphaned_files cr_check_orphaned_files->ad_log_deprecated cr_check_orphaned_files->cr_count_file_entries cr_check_orphaned_files->util::which

Testcases:
No testcase defined.

cr_cleanup_orphaned_files (private)

 cr_cleanup_orphaned_files

Helper proc to cleanup orphaned files in the content repository. Orphaned files can be created during aborted transactions involving the files being added to the content repository.

Partial Call Graph (max 5 caller/called nodes):
%3 cr_delete_scheduled_files cr_delete_scheduled_files (private) cr_cleanup_orphaned_files cr_cleanup_orphaned_files cr_delete_scheduled_files->cr_cleanup_orphaned_files cr_delete_orphans cr_delete_orphans (private) cr_cleanup_orphaned_files->cr_delete_orphans cr_get_file_creation_log cr_get_file_creation_log (private) cr_cleanup_orphaned_files->cr_get_file_creation_log

Testcases:
No testcase defined.

cr_delete_scheduled_files (private)

 cr_delete_scheduled_files

Tries to delete all the files in cr_files_to_delete. Makes sure file isn't being used by another revision prior to deleting it. Should be scheduled daily. This proc is extremely simple, and does not have any concurrency checks to make sure another version of the proc is running/deleting a file. Will add some concurrency checks to a future revision. Right now go with short and sweet, count on scheduling to prevent conflicts

Partial Call Graph (max 5 caller/called nodes):
%3 cr_cleanup_orphaned_files cr_cleanup_orphaned_files (private) cr_fs_path cr_fs_path (private) db_dml db_dml (public) db_foreach db_foreach (public) db_transaction db_transaction (public) cr_delete_scheduled_files cr_delete_scheduled_files cr_delete_scheduled_files->cr_cleanup_orphaned_files cr_delete_scheduled_files->cr_fs_path cr_delete_scheduled_files->db_dml cr_delete_scheduled_files->db_foreach cr_delete_scheduled_files->db_transaction

Testcases:
No testcase defined.

cr_scan_mime_types (private)

 cr_scan_mime_types

Scan AOLserver mime types and insert them into cr_mime_types

Author:
ben@openforce

Partial Call Graph (max 5 caller/called nodes):
%3 packages/acs-content-repository/tcl/acs-content-repository-init.tcl packages/acs-content-repository/ tcl/acs-content-repository-init.tcl cr_scan_mime_types cr_scan_mime_types packages/acs-content-repository/tcl/acs-content-repository-init.tcl->cr_scan_mime_types db_dml db_dml (public) cr_scan_mime_types->db_dml

Testcases:
No testcase defined.
[ show source ]