Skip to main content
Solved

Set time limit for specific workbench or transformer


Forum|alt.badge.img

I have a script which is fetching multiple images with an imageFetcher. Sometimes the external services stops responding and the script never stop running. See pic attached showing the last rows from the log.

To avoid building a never ending queue I would like to limit this specific script to 15 minutes but I don't find any built feature. I have tried some python callers like timer and time.sleep but nothing really matches the requirement.

Any suggestions?

Best answer by david_r

It looks like you're using an older version of FME Server, e.g. 2016?

Newer version of FME Server lets you set a running job expiry time:

Running Job Expiry Time (optional): The time, in seconds, a job will remain in the running state. This directive is used to ensure that a job does not hang and block an FME Engine indefinitely

Source: https://docs.safe.com/fme/html/FME_Server_Documentation/Content/WebUI/Configuring_Running_Workspaces.htm

View original
Did this help you find an answer to your question?

4 replies

david_r
Celebrity
  • Best Answer
  • November 5, 2018

It looks like you're using an older version of FME Server, e.g. 2016?

Newer version of FME Server lets you set a running job expiry time:

Running Job Expiry Time (optional): The time, in seconds, a job will remain in the running state. This directive is used to ensure that a job does not hang and block an FME Engine indefinitely

Source: https://docs.safe.com/fme/html/FME_Server_Documentation/Content/WebUI/Configuring_Running_Workspaces.htm


tim_wood
Contributor
Forum|alt.badge.img+8
  • Contributor
  • November 5, 2018

If you want to do this purely in Desktop, how about adding a Creator > TimeStamper > VariableSetter to log the time the translation starts, and a TimeStamper for each feature being processed. Then retrieve the translation start time from the variable and compare with the timestamp for that feature, and call a Terminator if the difference is too high.


Forum|alt.badge.img
tim_wood wrote:

If you want to do this purely in Desktop, how about adding a Creator > TimeStamper > VariableSetter to log the time the translation starts, and a TimeStamper for each feature being processed. Then retrieve the translation start time from the variable and compare with the timestamp for that feature, and call a Terminator if the difference is too high.

It would probably work if all features finishes but the problem is that the image fetcher gets stuck in the middle of it's own process so the time stamper that follows will never be initiated and the script will never finish.


Forum|alt.badge.img
david_r wrote:

It looks like you're using an older version of FME Server, e.g. 2016?

Newer version of FME Server lets you set a running job expiry time:

Running Job Expiry Time (optional): The time, in seconds, a job will remain in the running state. This directive is used to ensure that a job does not hang and block an FME Engine indefinitely

Source: https://docs.safe.com/fme/html/FME_Server_Documentation/Content/WebUI/Configuring_Running_Workspaces.htm

Yes I'm running 2015 but an upgrade to 2018 is initiated so that is good news.

I thought it was a global time limit but it looks like it will be possible to set the time limit for specific jobs. Thanks!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings