Hi, I had another question. Has anyone here manage...
# ask-metaflow
l
Hi, I had another question. Has anyone here managed to trigger a workflow based on a file landing in a specified folder in an S3 bucket? If so, what's the best practice to do it? I already added @trigger(event="file_uploaded") at the top of the flow, but the rest is where the jank starts. I basically start a master node in a Kubernetes cluster which runs a python script on startup. The python script is an infinite while loop which just looks if there is a file in the S3 bucket, and if so, publishes an ArgoEvent with the name "file_uploaded". My intuition tells me there's gotta be a less Neanderthal way of doing it, but I can't seem to figure it out. Any help would be much appreciated. Thanks in advance :)
a
we are looking into offering a first class integration. this came up very recently elsewhere. also, re: the python script - you can also replace that with a metaflow flow that runs every few mins - still not entirely ideal but hopefully a bit better
h
You can manually setup S3 notifications to trigger your workflow, but as Savin mentioned we're still looking into direct integrations with Metaflow
l
Oh, thanks for letting me know 🙂