Skip to main content

Hello,

is it possible to run from fme system call (or python caller) and don't wait for the result?

Hi @witos

Would you like to send the results by email, for example?

Thanks,

Danilo


Hi @witos

Would you like to send the results by email, for example?

Thanks,

Danilo

Hi @danilo_fme. It is not needed. In my ptyhon script that will be executed I will have some code to update database once it is finished, but if it is possible to send email or do web api call then why not. I just want to know what are the possibilities.

 


Hi @danilo_fme. It is not needed. In my ptyhon script that will be executed I will have some code to update database once it is finished, but if it is possible to send email or do web api call then why not. I just want to know what are the possibilities.

 

Perfect. You can to integration with API. There is a interesting custom transform TwilioCaller and TwilioSMSSender.

 

It is very easy to use this transform. You can do download here:

 

https://hub.safe.com/api/v2/transformers/twiliocaller/downloadhttps://hub.safe.com/api/v2/transformers/twiliocaller/download

 

 

Thanks,

 

Danilo

 

 


Perfect. You can to integration with API. There is a interesting custom transform TwilioCaller and TwilioSMSSender.

 

It is very easy to use this transform. You can do download here:

 

https://hub.safe.com/api/v2/transformers/twiliocaller/downloadhttps://hub.safe.com/api/v2/transformers/twiliocaller/download

 

 

Thanks,

 

Danilo

 

 

Thanks but the main question is: can I run a systemCaller and don't wait for the result, just finish FME Job and don't occupy FME Engine anymore?

 

 


No, there isn't such an option not to wait for the result from a program executed via SystemCaller or PythonCaller.

If necessary, consider creating another workspace containing the WorkspaceRunner (Wait for Job Complete: No) to run the workspace which contains the SystemCaller or the PythonCaller.


The SystemCaller is synchronous, but you can use a PythonCaller with something like the following to execute an external command asynchronously:

import subprocess

my_command = subprocess.Popen(d'command1.exe', 'args1', 'arg2'],
                              stdin=None, stdout=None, stderr=None, close_fds=True)

This will execute "command1.exe" with the arguments "args1" and "args2" and FME will continue the workspace without waiting for the result.


The SystemCaller is synchronous, but you can use a PythonCaller with something like the following to execute an external command asynchronously:

import subprocess

my_command = subprocess.Popen(d'command1.exe', 'args1', 'arg2'],
                              stdin=None, stdout=None, stderr=None, close_fds=True)

This will execute "command1.exe" with the arguments "args1" and "args2" and FME will continue the workspace without waiting for the result.

cool, thanks!

 

 


The SystemCaller is synchronous, but you can use a PythonCaller with something like the following to execute an external command asynchronously:

import subprocess

my_command = subprocess.Popen(d'command1.exe', 'args1', 'arg2'],
                              stdin=None, stdout=None, stderr=None, close_fds=True)

This will execute "command1.exe" with the arguments "args1" and "args2" and FME will continue the workspace without waiting for the result.

😍 Just what I needed right now...

 

And when I finish the external command with triggering a webhook to a workspace with the second half of the process, it saves me 10 hours of running-but-actually-idle engine capacity.


😍 Just what I needed right now...

 

And when I finish the external command with triggering a webhook to a workspace with the second half of the process, it saves me 10 hours of running-but-actually-idle engine capacity.

😕 It works, as long as the workspace (and the python-environment in which I did pOpen) is alive. As soon as the workspace stops, the python-environent stops and so does the external process I triggered...

 

So no silently running process outside of FME, which wil trigger the next step when done.


Reply