I am calling a Triggered Task (which does a ETL process) using a cURL command from a Shell script. Based on the output from the shell script, I would trigger the next process or exit with failure.
I am using the following in the shell script.
curl -H ‘Authorization: Bearer xxxx’ ‘http://xxxxx/xxx/xxx’ -v > $LOG 2>&1 <<END_SCRIPT
The shell script executes and exits in 3 to 5 seconds whether it is a success or a failure. If it is a success, the Log file has a HTTP Status = 200 and if it is failure, the HTTP Status != 200.
If it is a success, the shell script exists in 4 seconds but the ETL Insert is actually taking 3 mins to finish even after the shell script exits with success and since the shell script of task1 exits successfully, the task 2 is triggered thru another shell script which has a cURL command.
My issue is the dependent task should only start after the completion of the first task(only after all the records are inserted into the Oracle table ).
Below is the extract of the log file masking the host.
Authorization: Bearer xxxxxxxxxxxx
< HTTP/1.1 200 OK
< Date: Tue, 23 Oct 2018 14:15:29 GMT
< Content-Length: 0
< Server: Jetty(9.4.0.v20161208)
- Connection #0 to host xxxx.xxxx.com left intact