mirror of
https://github.com/ansible/awx.git
synced 2026-02-28 08:18:43 -03:30
Merge pull request #6671 from wenottingham/even-moar-data-plz
Collect task timing, warnings, and deprecations from job events Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
@@ -222,7 +222,7 @@ def query_info(since, collection_type):
|
|||||||
|
|
||||||
|
|
||||||
# Copies Job Events from db to a .csv to be shipped
|
# Copies Job Events from db to a .csv to be shipped
|
||||||
@table_version('events_table.csv', '1.0')
|
@table_version('events_table.csv', '1.1')
|
||||||
@table_version('unified_jobs_table.csv', '1.0')
|
@table_version('unified_jobs_table.csv', '1.0')
|
||||||
@table_version('unified_job_template_table.csv', '1.0')
|
@table_version('unified_job_template_table.csv', '1.0')
|
||||||
def copy_tables(since, full_path):
|
def copy_tables(since, full_path):
|
||||||
@@ -248,7 +248,12 @@ def copy_tables(since, full_path):
|
|||||||
main_jobevent.role,
|
main_jobevent.role,
|
||||||
main_jobevent.job_id,
|
main_jobevent.job_id,
|
||||||
main_jobevent.host_id,
|
main_jobevent.host_id,
|
||||||
main_jobevent.host_name
|
main_jobevent.host_name,
|
||||||
|
CAST(main_jobevent.event_data::json->>'start' AS TIMESTAMP) AS start,
|
||||||
|
CAST(main_jobevent.event_data::json->>'end' AS TIMESTAMP) AS end,
|
||||||
|
main_jobevent.event_data::json->'duration' AS duration,
|
||||||
|
main_jobevent.event_data::json->'res'->'warnings' AS warnings,
|
||||||
|
main_jobevent.event_data::json->'res'->'deprecations' AS deprecations
|
||||||
FROM main_jobevent
|
FROM main_jobevent
|
||||||
WHERE main_jobevent.created > {}
|
WHERE main_jobevent.created > {}
|
||||||
ORDER BY main_jobevent.id ASC) TO STDOUT WITH CSV HEADER'''.format(since.strftime("'%Y-%m-%d %H:%M:%S'"))
|
ORDER BY main_jobevent.id ASC) TO STDOUT WITH CSV HEADER'''.format(since.strftime("'%Y-%m-%d %H:%M:%S'"))
|
||||||
|
|||||||
Reference in New Issue
Block a user