Add timestamp to pipeline runs (#91599)

* Add timestamp to pipeline runs

* Include the timestamp in the list
This commit is contained in:
Erik Montnemery 2023-04-18 16:43:46 +02:00 committed by GitHub
parent 4132f08146
commit 016e051db6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 6 deletions

View file

@ -232,7 +232,15 @@ def websocket_list_runs(
pipeline_runs = pipeline_data.pipeline_runs[pipeline_id]
connection.send_result(msg["id"], {"pipeline_runs": list(pipeline_runs)})
connection.send_result(
msg["id"],
{
"pipeline_runs": [
{"pipeline_run_id": id, "timestamp": pipeline_run.timestamp}
for id, pipeline_run in pipeline_runs.items()
]
},
)
@callback
@ -274,5 +282,5 @@ def websocket_get_run(
connection.send_result(
msg["id"],
{"events": pipeline_runs[pipeline_run_id]},
{"events": pipeline_runs[pipeline_run_id].events},
)