Index: openacs-4/packages/acs-admin/www/auth/authority-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/auth/Attic/authority-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/auth/authority-oracle.xql 20 Oct 2003 15:05:26 -0000 1.1
@@ -0,0 +1,28 @@
+
+
+oracle8.1.6
+
+
+
+
+ select job_id,
+ to_char(job_start_time, 'YYYY-MM-DD HH24:MI:SS') as start_time_ansi,
+ to_char(job_end_time, 'YYYY-MM-DD HH24:MI:SS') as end_time_ansi,
+ snapshot_p,
+ (select count(e1.entry_id)
+ from auth_batch_job_entries e1
+ where e1.job_id = auth_batch_jobs.job_id) as num_actions,
+ (select count(e2.entry_id)
+ from auth_batch_job_entries e2
+ where e2.job_id = auth_batch_jobs.job_id
+ and e2.success_p = 'f') as num_problems,
+ interactive_p,
+ message,
+ (nvl(job_end_time, sysdate) - job_start_time) * 24*60*60 as run_time_seconds
+ from auth_batch_jobs
+ where authority_id = :authority_id
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/auth/authority-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/auth/Attic/authority-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/acs-admin/www/auth/authority-postgresql.xql 20 Oct 2003 15:05:26 -0000 1.1
@@ -0,0 +1,29 @@
+
+
+postgresql7.1
+
+
+
+
+ select job_id,
+ to_char(job_start_time, 'YYYY-MM-DD HH24:MI:SS') as start_time_ansi,
+ to_char(job_end_time, 'YYYY-MM-DD HH24:MI:SS') as end_time_ansi,
+ snapshot_p,
+ (select count(e1.entry_id)
+ from auth_batch_job_entries e1
+ where e1.job_id = auth_batch_jobs.job_id) as num_actions,
+ (select count(e2.entry_id)
+ from auth_batch_job_entries e2
+ where e2.job_id = auth_batch_jobs.job_id
+ and e2.success_p = 'f') as num_problems,
+ interactive_p,
+ message,
+ trunc(extract(epoch from (coalesce(job_end_time, current_timestamp) - job_start_time))) as run_time_seconds
+ from auth_batch_jobs
+ where authority_id = :authority_id
+
+
+
+
+
+
Index: openacs-4/packages/acs-admin/www/auth/authority.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-admin/www/auth/authority.tcl,v
diff -u -r1.12 -r1.13
--- openacs-4/packages/acs-admin/www/auth/authority.tcl 16 Oct 2003 09:47:27 -0000 1.12
+++ openacs-4/packages/acs-admin/www/auth/authority.tcl 20 Oct 2003 15:05:26 -0000 1.13
@@ -213,6 +213,13 @@
end_time_pretty {
label "End time"
}
+ run_time_seconds {
+ label "Run time"
+ html { align right }
+ display_template {
+ @batch_jobs.run_time_seconds@ secs
+ }
+ }
num_actions {
label "Actions"
html { align right }
@@ -221,6 +228,10 @@
label "Problems"
html { align right }
}
+ actions_per_minute {
+ label "Actions/Minute"
+ html { align right }
+ }
short_message {
label "Message"
}
@@ -233,23 +244,14 @@
set display_batch_history_p [expr $authority_exists_p && [string equal $ad_form_mode "display"]]
if { $display_batch_history_p } {
- db_multirow -extend { job_url start_time_pretty end_time_pretty interactive_pretty short_message } batch_jobs select_batch_jobs {
- select job_id,
- to_char(job_start_time, 'YYYY-MM-DD HH24:MI:SS') as start_time_ansi,
- to_char(job_end_time, 'YYYY-MM-DD HH24:MI:SS') as end_time_ansi,
- snapshot_p,
- (select count(e1.entry_id)
- from auth_batch_job_entries e1
- where e1.job_id = auth_batch_jobs.job_id) as num_actions,
- (select count(e2.entry_id)
- from auth_batch_job_entries e2
- where e2.job_id = auth_batch_jobs.job_id
- and e2.success_p = 'f') as num_problems,
- interactive_p,
- message
- from auth_batch_jobs
- where authority_id = :authority_id
- } {
+ db_multirow -extend {
+ job_url
+ start_time_pretty
+ end_time_pretty
+ interactive_pretty
+ short_message
+ actions_per_minute
+ } batch_jobs select_batch_jobs {} {
set job_url [export_vars -base batch-job { job_id }]
set start_time_pretty [lc_time_fmt $start_time_ansi "%x %X"]
@@ -258,6 +260,11 @@
set interactive_pretty [ad_decode $interactive_p "t" "Yes" "No"]
set short_message [string_truncate -len 30 $message]
+
+ set actions_per_minute {}
+ if { $run_time_seconds > 0 && $num_actions > 0 } {
+ set actions_per_minute [expr round(60.0 * $num_actions / $run_time_seconds)]
+ }
}
if { [exists_and_not_null get_doc_impl_id] && [exists_and_not_null process_doc_impl_id] } {
set batch_sync_run_url [export_vars -base batch-job-run { authority_id }]