In order to automatically restart a job that might have failed for a transient reason (network timeout for instance or 404 for some resource) then I can use the Talend Cloud API (https://ipaas.eu.cloud.talend.com/api/swagger/swagger-ui.html#!/executions/execute) to re-run the flow that failed (after catching the error and logging it, etc.). However, I need to know the "executable" value for the flow in question, as the error is being caught inside the running job, it will also have to be inside the job that I call the TIC API to re-run it, so is there a way, variable, etc. to get the "executable" value for the currently running job inside the job itself?
I could conceivably do a GET on https://ipaas.eu.cloud.talend.com/api/swagger/swagger-ui.html#!/executions/getExecutionStatus, however, this requires the "execution-id" is there a way to get this from inside the job (bearing in mind there may be multiple jobs running at once)?
A slightly different way of approaching this, but it might give you an idea.
Could you start all your jobs using the API (https://ipaas.eu.integrationcloud.talend.com/api/v1/executions). If you can do that, then whenever you start a job this way, the execution Id is returned to you. Then you could poll the active job(s) using the execution Id(s) you have noted using the getExecutionStatus call. All this would take would be a job run periodically (I've used a Talend Route when trying this out in the past) and a database table that can keep a log of running execution Ids.
If I have understood your requirement correctly, I think this might be a reasonable solution.
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Watch the recorded webinar!
This video will show you how to run a job in Studio and then publish that job to Talend Cloud
This video will help someone new to using Talend Studio get started by connecting to Talend Cloud and fetching the Studio License
The Talend Cloud Developer Series was created to give you a solid foundational understanding of Talend’s Cloud Integration Platform