Process only one time a file in shared folder

Posted 1 year ago by plutarcomp

I have an Android and IOS app that uploads images (about 15,000 per minute) to a AWS S3 bucket, everything is all right, but i need to process those images from 2 - 50 different monitors, every monitor begin to scan the S3 bucket for the filenames, something like:

$recibidos = Storage::disk('s3recibidos');
$total_archivos = $recibidos->allfiles();

with this i have an array with the files are stored in the time the route is invoked, i understand that with one monitor there is no problem, because the process is one time only, but what about 2 or more monitors? the process retrieves no the exact list but i think many of the un processed files will be duplicated.

I need help in this two things:

1.- How to deal with the process. 2.- How can i use wildcards, because one of the final process changes the filename of the files in S3, so the filename list that i need to process has its exepecific format.

Thanks for any advice

Please sign in or create an account to participate in this conversation.