Find Files

Questions and answers on how to get the most out of FFAStrans
Post Reply
graham728
Posts: 89
Joined: Sat Oct 13, 2018 10:54 pm

Find Files

Post by graham728 »

Hi,

I have built a Python App that can search a directory for files. It works well and has a function to copy files to a particular location.

The copy function uses the local client laptop which can have a slow VPN connection.

I'm wondering if there's a way I can get FFASTRANS to do the copy?

Something as simple as the Python app drops the name of the file in a watch folder as a stub file - for example - TESTFILE.MXF

FFASTRANS searches a chosen directory for the file and it copies it to a specified location.

Does FFASTRANS have a function to search for files in this manner?
User avatar
FranceBB
Posts: 285
Joined: Sat Jun 25, 2016 3:43 pm
Contact:

Re: Find Files

Post by FranceBB »

Out of curiosity: if you've already built the search function and it's running as intended, but it's just the copy of the file that is slow and you would like FFAStrans to do it, why don't you just call the FFAStrans APIs to trigger the copy?

I mean, you can create a very simple workflow in which there's only one node, the delivery node.
Then, when your search function runs on the laptop, it will search the file, it will retrieve the path and once it finds it, instead of triggering the copy, it just has to call the FFAStrans workflow by passing the path (in a json format, so each \ becomes \\ in the path) of the input file and this way it will make FFAStrans trigger the copy.
emcodem
Posts: 1869
Joined: Wed Sep 19, 2018 8:11 am

Re: Find Files

Post by emcodem »

We have the files find plugin but you'd still need to find a way how to trigger a job, one way to do it is to trigger the job periodically which you most likely do with your python script. Another one is to run in a loop where the job spawns itself over and over but there is no smart way to ensure the job stays running.
emcodem, wrapping since 2009 you got the rhyme?
Post Reply