![]() |
Batch library - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: Batch library (/showthread.php?tid=51917) |
Batch library - El Forum - 05-23-2012 [eluser]Unknown[/eluser] Hello! I have a problem - to perform many intensive function after submitting the form. Such example: 1. The user loads the XML with tags - name, url, mail, date (dd-mm-YY) etc.. Above 1000-5000 records. 2. I need to valid name, download file form url, save to folder, valid mail, convert date to Unixtime and save results to database (with merge if exist). There are many similar tasks in the project, so I decided to write a universal ajax-batch library for using it in future. How it works: 1. submit the form. 2. creating array of functions to be performed as example: Code: $process = array( 3. redirect to batch-controller page with post of this array 4. page sends arguments to batch-execute-page via AJAX (batch_id, current_id, arg1, arg2 ....), returning JSON data (success or not, some result params etc..) 5. using progress bar with some messages on this page 6. redirect user to success/error page. All code for creating batch as this: Code: $this->load->library('batch'); For using also needed to include JS ajax-queue-library. My question to the developers: A. Is there a ready library for such tasks for CodeIgniter? B. If not, in the right direction I'm developing? P.S. Sorry for my bad English (( Batch library - El Forum - 05-24-2012 [eluser]Unknown[/eluser] Does not anyone faced with this task? :-S |