Seems like overkill to me.. Why not simply provide an upload form to import csv? That's how I always do it - its nonsense to put ftp in between IMO
Also, using some basic functionality you can also assert that this job is not run twice in the same instance by locking the action when its currently "used" by someone. That's called a mutex - and can be implemented as file or db based approach Even though I don't think most normal actions would have a problem with two requests the same time - especially when using transactions and if all the batch saving is done right after the validation - allowing no other process to intefere. Am Sonntag, 27. Oktober 2013 07:38:07 UTC+1 schrieb Ashish Mahana: > > Hi All, > > I have an issue with cakephp like, > > I have an app where the user will update their inventory by csv file read > from a ftp server. So what i did i have a controller to do all stuff like > > > 1. connect and get the csv file of the user > 2. get the data from the csv > 3. insert into the related model > > my problem is that while a single user is doing the operation its > working fine but if two user simultaneously doing the operation (updating > the inventory) then one user is getting failed to update inventory!!! > > Any solution for this plz help me .... > > > > > > > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
