From: janw Date: Mon, 26 May 2008 13:56:54 +0000 (+0000) Subject: Added more robustness when crashing on creating package lists. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6f0bb784cedaee0568cf387780afb7d4fd189335;p=gosa.git Added more robustness when crashing on creating package lists. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11006 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server index 289244446..dc82ecbef 100755 --- a/gosa-si/gosa-si-server +++ b/gosa-si/gosa-si-server @@ -2210,14 +2210,25 @@ sub create_packages_list_db { close (CONFIG); find(\&cleanup_and_extract, keys( %repo_dirs )); - &main::strip_packages_list_statements(); + eval { + &main::strip_packages_list_statements(); + }; + if($@) { + daemon_log("$session_id ERROR: Preparation of statement list failed with '$@'!", 1); + } unshift @packages_list_statements, "VACUUM"; - $packages_list_db->exec_statementlist(\@packages_list_statements); + eval { + $packages_list_db->exec_statementlist(\@packages_list_statements); + }; + if($@) { + daemon_log("$session_id ERROR: Updating package_list_db failed with '$@'!", 1); + } unlink($packages_list_under_construction); daemon_log("$session_id INFO: create_packages_list_db: finished", 5); return; } + # This function should do some intensive task to minimize the db-traffic sub strip_packages_list_statements { my @existing_entries= @{$packages_list_db->exec_statement("SELECT * FROM $main::packages_list_tn")};