auth::sync::job::get (public)

 auth::sync::job::get -job_id job_id -array array

Defined in packages/acs-authentication/tcl/sync-procs.tcl

Get information about a batch job in an array.

Switches:
-job_id
(required)
The ID of the batch job you're ending.
-array
(required)
Name of an array into which you want the information.
Author:
Lars Pind <lars@collaboraid.biz>

Partial Call Graph (max 5 caller/called nodes):
%3 test_sync_batch_for_local sync_batch_for_local (test acs-authentication) auth::sync::job::get auth::sync::job::get test_sync_batch_for_local->auth::sync::job::get test_sync_batch_ims_example_doc sync_batch_ims_example_doc (test acs-authentication) test_sync_batch_ims_example_doc->auth::sync::job::get test_sync_batch_ims_test sync_batch_ims_test (test acs-authentication) test_sync_batch_ims_test->auth::sync::job::get ad_url ad_url (public) auth::sync::job::get->ad_url db_1row db_1row (public) auth::sync::job::get->db_1row export_vars export_vars (public) auth::sync::job::get->export_vars auth::sync::job::end auth::sync::job::end (public) auth::sync::job::end->auth::sync::job::get packages/acs-admin/www/auth/batch-action.tcl packages/acs-admin/ www/auth/batch-action.tcl packages/acs-admin/www/auth/batch-action.tcl->auth::sync::job::get packages/acs-admin/www/auth/batch-job.tcl packages/acs-admin/ www/auth/batch-job.tcl packages/acs-admin/www/auth/batch-job.tcl->auth::sync::job::get

Testcases:
sync_batch_for_local, sync_batch_ims_example_doc, sync_batch_ims_test
Source code:
    upvar 1 $array row

    db_1row select_job {} -column_array row

    set row(log_url) [export_vars -base "[ad_url]/acs-admin/auth/batch-job" { job_id }]
Generic XQL file:
packages/acs-authentication/tcl/sync-procs.xql

PostgreSQL XQL file:
<fullquery name="auth::sync::job::get.select_job">
    <querytext>
            select job_id,
                   to_char(job_start_time, 'YYYY-MM-DD HH24:MI:SS') as job_start_time,
                   to_char(job_end_time, 'YYYY-MM-DD HH24:MI:SS') as job_end_time,
                   interactive_p,
                   snapshot_p,
                   authority_id,
                   (select aa.pretty_name from auth_authorities aa where aa.authority_id = j.authority_id) as authority_pretty_name,
                   message,
                   creation_user,
                   to_char(doc_start_time, 'YYYY-MM-DD HH24:MI:SS') as doc_start_time,
                   to_char(doc_end_time, 'YYYY-MM-DD HH24:MI:SS') as doc_end_time,
                   doc_status,
                   doc_message,
                   trunc(extract(epoch from (j.job_end_time - j.job_start_time))) as run_time_seconds,
                   (select count(e1.entry_id)
                    from   auth_batch_job_entries e1
                    where  e1.job_id = j.job_id) as num_actions,
                   (select count(e2.entry_id)
                    from   auth_batch_job_entries e2
                    where  e2.job_id = j.job_id
                    and    e2.success_p = 'f') as num_problems
            from    auth_batch_jobs j
            where  j.job_id = :job_id
        </querytext>
</fullquery>
packages/acs-authentication/tcl/sync-procs-postgresql.xql

Oracle XQL file:
<fullquery name="auth::sync::job::get.select_job">
    <querytext>
            select job_id,
                   to_char(job_start_time, 'YYYY-MM-DD HH24:MI:SS') as job_start_time,
                   to_char(job_end_time, 'YYYY-MM-DD HH24:MI:SS') as job_end_time,
                   interactive_p,
                   snapshot_p,
                   authority_id,
                   (select aa.pretty_name from auth_authorities aa where aa.authority_id = j.authority_id) as authority_pretty_name,
                   message,
                   creation_user,
                   to_char(doc_start_time, 'YYYY-MM-DD HH24:MI:SS') as doc_start_time,
                   to_char(doc_end_time, 'YYYY-MM-DD HH24:MI:SS') as doc_end_time,
                   doc_status,
                   doc_message,
                   round((j.job_end_time - j.job_start_time) * 24*60*60) as run_time_seconds,
                   (select count(e1.entry_id)
                    from   auth_batch_job_entries e1
                    where  e1.job_id = j.job_id) as num_actions,
                   (select count(e2.entry_id)
                    from   auth_batch_job_entries e2
                    where  e2.job_id = j.job_id
                    and    e2.success_p = 'f') as num_problems
            from    auth_batch_jobs j
            where  j.job_id = :job_id
        </querytext>
</fullquery>
packages/acs-authentication/tcl/sync-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: