Good evening
I have a large number of files that contain meta data formatted as xml. The files are placed in a well organized directory tree, categorized by time and place of creation. I am parsing the XML using HTML::Parser and entering the data that I am interested in into a relational database, by walking the nodes of the tree using File::Find
All is working very well... but there is an issue that has to do with the shear volume of the data that I am processing, tens of thousands of files.
I am thinking of methods that I can use to gracefully interrupt the process, without loss of data, and then pick up where I left off at a later time, and perhaps on a different computer.
My idea, that should work, is to periodically check for the existence of a file (could be stdin) that would have a command instructing the program to finish what it's doing, record where it is, the next file to be processed, and then gracefully exit. Use of a command would allow for future direction from the outside, but thats beyond the scope of my question.
my question, simply put is there a better way, perhaps something in CPAN, signals or whatever. I'm thinking that if I write this, I might very well be reinventing the wheel. And would be happy to use OPC.
Largins
In reply to Gracefully exiting and restarting at a later time. by Largins
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |