<@ULVA73B9P> When using cloud run push jobs, is th...
# ask-marvin
m
@Marvin When using cloud run push jobs, is there a way to only keep jobs that are unsuccessful? We don't want to set keep_job=True for all executions as cloud run then becomes very cluttered
m
I couldn't find specific documentation regarding the selective retention of unsuccessful jobs for Cloud Run in the Prefect documentation. If there is a built-in feature for this, it wasn't clearly stated in the docs I found. What you might have to do is implement a custom cleanup mechanism that queries the status of jobs after they've finished and deletes the successful ones. One potential way to manage job cleanup is to use the
keep_job
configuration option for the Cloud Run worker, but as you noted, setting this to
True
will keep all jobs, successful or not. If you would like to see the documentation that I reviewed or dig into details around configuring Cloud Run workers, here are the links: - Push Work Pools - Prefect GCP Cloud Run Source Code Reference - Prefect GCP Cloud Run Worker Source Code Reference The functionality you're looking for may be requested as a feature or could be managed by contributing to the project if it does not exist currently. You might also consider reaching out to the Prefect community or looking into existing GitHub issues for more insights or workarounds.