auth::sync::job::end (public)
auth::sync::job::end -job_id job_id [ -message message ]
Defined in packages/acs-authentication/tcl/sync-procs.tcl
Record the end of a batch job. Closes out the transaction log and sends out notifications.
- Switches:
- -job_id (required)
- The ID of the batch job you're ending.
- -message (optional)
- Returns:
- array list with result of auth::sync::job::get.
- Author:
- Lars Pind <lars@collaboraid.biz>
- See Also:
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- sync_start_end, sync_actions, sync_snapshot
Source code: db_dml update_job_end {} # interactive_p, run_time_seconds, num_actions, num_problems get -job_id $job_id -array job set email_p [parameter::get_from_package_key -parameter SyncEmailConfirmationP -package_key "acs-authentication" -default 0] if { ![string is true -strict $job(interactive_p)] && $email_p } { # Only send out email if not an interactive job ad_try { acs_mail_lite::send -send_immediately -to_addr [ad_system_owner] -from_addr [ad_system_owner] -subject "Batch user synchronization for $job(authority_pretty_name) complete" -body "Batch user synchronization for $job(authority_pretty_name) is complete. Authority : $job(authority_pretty_name) Running time : $job(run_time_seconds) seconds Number of actions : $job(num_actions) Number of problems: $job(num_problems) Job message : $job(message) To view the complete log, please visit\n$job(log_url)" } on error {errorMsg} { # We don't fail hard here, just log an error ad_log Error "Error sending registration confirmation to [ad_system_owner]: $errorMsg" } } return [array get job]Generic XQL file: <fullquery name="auth::sync::job::end.update_job_end"> <querytext> update auth_batch_jobs set job_end_time = current_timestamp, message = :message where job_id = :job_id </querytext> </fullquery>packages/acs-authentication/tcl/sync-procs.xql
PostgreSQL XQL file: packages/acs-authentication/tcl/sync-procs-postgresql.xql
Oracle XQL file: packages/acs-authentication/tcl/sync-procs-oracle.xql