I was just curious why all these jobs stay around ...
# prefect-community
s
I was just curious why all these jobs stay around with the helm prefect-agent. I am using the most recent version of prefect-agentalso. Cuz I can't view the logs for previous jobs, it says
Stream closed EOF for prod-prefect/analytic-shrimp5rkr9-j82lj (prefect-job)
for all of them. Are they supposed to auto delete?
1
k
you can customize the kubernetes job with
Copy code
"spec": {
    "ttlSecondsAfterFinished": 100,
to specify the number of seconds after a job is finished until the pod is deleted
1
gratitude thank you 2
s
Thank you
k
to be clear, I'm referring to the job that your flow will run in, not the agent manifest
s
Yes, I understood. I'm going to change the k8s-job-block in the UI that my flows run in
🙌 1
I changed the job and it's still not deleting. I tested two flows, and they're still here after 20 minutes
k
put the setting inside the outer spec
🙌 1
👍 1
Copy code
"spec": {
    "ttlSecondsAfterFinished": 100,
    "template": {
      "spec": {
        "parallelism": 1,
        "completions": 1,
🙏 1
s
Perfect, it just deleted
❤️ 1