Fix a problem with the events_table analytics collectors

The switch to using jsonb objects instead of json broke the use of
json_to_record in the raw sql in the _events_table function.
This commit is contained in:
Jeff Bradberry 2021-12-20 14:03:24 -05:00
parent ddc428532f
commit 2ed246cb61

View File

@ -356,7 +356,7 @@ def _events_table(since, full_path, until, tbl, where_column, project_job_create
x.duration AS duration,
x.res->'warnings' AS warnings,
x.res->'deprecations' AS deprecations
FROM {tbl}, json_to_record({event_data}) AS x("res" json, "duration" text, "task_action" text, "start" text, "end" text)
FROM {tbl}, jsonb_to_record({event_data}) AS x("res" json, "duration" text, "task_action" text, "start" text, "end" text)
WHERE ({tbl}.{where_column} > '{since.isoformat()}' AND {tbl}.{where_column} <= '{until.isoformat()}')) TO STDOUT WITH CSV HEADER'''
return query