I have some jobs that I am launching using the Koyeb API every few hours. For now I have written a cleaner that cleans it up after its reports itself as finished either way.
These are background workers that finish succesfully or fail; currently Koyeb keeps restarting the the service even when it has an exit code 0; till my cleanup service cleans it.
I also receive an email that says the deployment failed. Can I just launch a job that cleans itself if it finishes with exit code0?
These are short jobs. Essentially ingestion jobs for our customers data that run normally for less than 30 minutes. I just found it easier to do this via the Koyeb API than set up and maintain a separate k8s cluster; scale to zero could work well for me!