Skip to main content
Solved

Multiple ws with fmeobjects.FMEWorkspaceRunner()

  • June 13, 2018
  • 3 replies
  • 41 views

jorge_vidinha
Contributor
Forum|alt.badge.img+2

Hello, im searching for the possibility of running multiple workspaces at the same time (not queued jobs) making use of the python fme objects fmeobjects.FMEWorkspaceRunner() .

I was kind of hoping that i could pass a list of dictionarys as 'parameters' argument to runWithParameters(workspace, parameters) ...

I was expecting the same behaviour as seen in workbench transformer WorkSpaceRunner, where you can set wait for job to complete = No and the amount of jobs to run (max 7, i suppose) run in parallel.

Im i missing something wiht this object, or im really suppose to implement some python multiprocessing technic to acomplished the parallelism needed ?

What your thoughts are ?

Regards,

Jorge

Best answer by david_r

The execution of FMEWorkspaceRunner() is synchronous, so you'll have to implement your own multithreading mechanisms if you need to run several workspaces in parallel, e.g. using the Python threading module.

On the other hand, I have no idea if the fmeobjects library is thread-safe...

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.

3 replies

david_r
Celebrity
  • Best Answer
  • June 13, 2018

The execution of FMEWorkspaceRunner() is synchronous, so you'll have to implement your own multithreading mechanisms if you need to run several workspaces in parallel, e.g. using the Python threading module.

On the other hand, I have no idea if the fmeobjects library is thread-safe...


sigtill
Supporter
Forum|alt.badge.img+25
  • Supporter
  • June 13, 2018

Use rather a Custom Transformer in parallell mode. And just run that workspace once. It will spin up multiple instances. https://knowledge.safe.com/articles/1211/parallel-processing.html


jorge_vidinha
Contributor
Forum|alt.badge.img+2
  • Author
  • Contributor
  • June 14, 2018

The execution of FMEWorkspaceRunner() is synchronous, so you'll have to implement your own multithreading mechanisms if you need to run several workspaces in parallel, e.g. using the Python threading module.

On the other hand, I have no idea if the fmeobjects library is thread-safe...

Thanks @david_r , somewhat taken into the incorrect assumption based on the name simililarity of FMEWorkspaceRunner() and the WorkspaceRunner transformer in Desktop. Wondering if naming the object as FMERunWorkspace() wouldnt be ok , but i dont know the background at all ...