Comments and answers for "Cancel Subjob automatically if Mainjob gets canceled" https://knowledge.亚搏在线safe.com/questions/79794/cancel-subjob-automatically-if-mainjob-gets-cancel.html The latest comments and answers for the question "Cancel Subjob automatically if Mainjob gets canceled" Comment by rdbath_ https://knowledge.safe.com/comments/79996/view.html @RichardAtSafe: I Am using FME Server 2017.0.1 - Build 17288 - linux-x64.The mainjob has a timeout of 30 mins.After this time the mainjob gets canceled but the subjob stays in the queue.
Mon, 08 Oct 2018 05:42:21 GMT rdbath_
Comment by richardatsafe https://knowledge.safe.com/comments/79953/view.html Hi @rdbath_,

As of 2017.1 all child jobs should be cancelled if the parent is cancelled through a condition, such as a timeout on a schedule or submitted job, or if manually cancelled.Would you be able to share information on how you are cancelling the master job and your build number?

Fri, 05 Oct 2018 18:14:23 GMT richardatsafe
Answer by mark2atsafe https://knowledge.safe.com/answers/79828/view.html

Yes, as@itaynotes, the transformer should have the same parameter to expire after a set time:


I guess the problem there is that it's a completely separate action to what happens to the main workspace.Because it's submitted as a separate job it's hard to tie the two together, so if one fails the other does too.

So the only way I can see to fully handle this scenario is to use the REST API (say as a call in the main workspace) to find the job ID and record that information somewhere.Then sporadically run a script (another workspace perhaps) to check for orphaned jobs, using the REST API again to delete them.

Or perhaps a Server expert can tell us of a better way?

Thu, 04 Oct 2018 15:28:27 GMT mark2atsafe
Answer by itay https://knowledge.safe.com/answers/79797/view.html

Hi@rdbath_

In the bottom part of the FMEServerJobSubmitter (advanced) you can add some directives to the child job.This is available in FME 2018.1 and 2017.1

Hope this helps.

Itay

Thu, 04 Oct 2018 13:09:10 GMT itay