Skip to main content
Solved

Set time limit for specific workbench or transformer

  • November 5, 2018
  • 4 replies
  • 67 views

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

david_r
Celebrity
  • 8394 replies
  • 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
  • 311 replies
  • 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
  • Author
  • 12 replies
  • November 6, 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.

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
  • Author
  • 12 replies
  • November 6, 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

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!