Created
November 12, 2015 00:27
-
-
Save robjshaw/8da07c80da59b4bb0f31 to your computer and use it in GitHub Desktop.
playing around with large files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <cfscript> | |
| queue = createobject('component', 'ecgateway.owi.business.services.queue'); | |
| folderName = createUUID(); | |
| </cfscript> | |
| <cfdirectory action="create" directory="/tmp/#folderName#" mode="777"> | |
| <cffile action="copy" source="/tmp/msns_50k.txt" destination="/tmp/#folderName#/" /> | |
| <cfexecute name="split" arguments="-l 500 /tmp/#folderName#/msns_50k.txt /tmp/#folderName#/" /> | |
| <cffile action="delete" file="/tmp/#folderName#/msns_50k.txt" /> | |
| <cfdirectory directory="/tmp/#folderName#/" name="fileSpilts" action="list" /> | |
| <cfloop query="fileSpilts"> | |
| <cffile action="read" file="/tmp/#folderName#/#fileSpilts.name#" variable="batchFile" /> | |
| <cfscript> | |
| arguments = {}; | |
| arguments.fileContents = batchFile; | |
| jobid = queue.addJob(doFunction = 'queueHealthCheck', doComponent = 'ecgateway.owi.business.services.queue', stArguments = arguments); | |
| writeoutput('<li>Your jobid:' & jobid & '</li>'); | |
| </cfscript> | |
| <cfflush /> | |
| </cfloop> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment