{= include "templates.shared.task_progress.build_progress_page"; include "templates.shared.util.get_task_id_of_db_build"; string profile_name = internal.profile_name; get_database_info(profile_name, "volatile.database_info"); node database_info = "volatile.database_info"; bool database_built = node_value(subnode_by_name(database_info, "built")); bool database_write_locked = node_value(subnode_by_name(database_info, "write_locked")); # debug_message("#### #### database info\n" . node_as_string(database_info) . "\n"); # debug_message("#### #### database built: " . database_built . "\n"); # debug_message("#### #### database write locked: " . database_write_locked . "\n"); if (!database_write_locked) then ( # ------------------------------------------------------------------------------------- # if database exists and no database task is active then show the start rebuild section # ------------------------------------------------------------------------------------- volatile.show_start_rebuild_database = true; rebuild_database_view; ) else ( # ------------------------------------------------------------- # if database is currently build, rebuild or updated then # show an info that the database is processed and show progress # ------------------------------------------------------------- string task_id = get_task_id_of_db_build(profile_name, 5000); if (task_id ne "") then ( build_progress_page(profile_name, "rebuild_database", task_id, ""); ) else ( # If no task_id exists there must be an error volatile.error_message = lang_admin.messages.no_progress_while_building_database; volatile.error_traceback = "No task_id for build_database() found. Error occurred in templates.config.rebuild_database.rebuild_database.cfv."; templates.shared.error_handling.error; ); ); =}