mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2026-01-08 05:26:19 +00:00
Fixes 18300: Get last completed job run (#18891)
* Get last completed job run
* formatting
---------
Co-authored-by: 😺Leo Luo <leo.luo@mavenclinic.com>
Co-authored-by: Suman Maharana <sumanmaharana786@gmail.com>
This commit is contained in:
parent
03bd8e9dc4
commit
b5750cbee1
@ -176,7 +176,11 @@ def _(config: DbtCloudConfig): # pylint: disable=too-many-locals
|
||||
logger.debug(
|
||||
"Requesting [dbt_catalog], [dbt_manifest] and [dbt_run_results] data"
|
||||
)
|
||||
params_data = {"order_by": "-finished_at", "limit": "1"}
|
||||
params_data = {
|
||||
"order_by": "-finished_at",
|
||||
"limit": "1",
|
||||
"status__in": "[10,20]",
|
||||
}
|
||||
if project_id:
|
||||
params_data["project_id"] = project_id
|
||||
|
||||
@ -194,7 +198,7 @@ def _(config: DbtCloudConfig): # pylint: disable=too-many-locals
|
||||
last_run = runs_data[0]
|
||||
run_id = last_run["id"]
|
||||
logger.info(
|
||||
f"Retrieved last successful run [{str(run_id)}]: "
|
||||
f"Retrieved last completed run [{str(run_id)}]: "
|
||||
f"Finished {str(last_run['finished_at_humanized'])} (duration: {str(last_run['duration_humanized'])})"
|
||||
)
|
||||
try:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user