The type of app you are trying to make would be better suited to a .NET
windows service I think since you need this to run on a scheduled basis and
synchronize when things happen.  However, I realize that might not be
desireable or possible.

I have some ideas but let me get some more info.  Could you maybe database
which files completed successfully and which were "Bad"?  If so, you could
have this occur in two scheduled tasks.  The first would conver the images
and store their filenames in a database (or XML or WDDX) as to whether the
conversion was successful.  The second task could run one minute or 5
minutes later (hopefully, imagemagic will have removed its lock on the files
by then) and attempt to either move or delete all files that the database
says are completed or "bad".   If it succeeds, it could then mark the
database record for each file as complete or just delete the record.  If you
want, you could even put a CFTRY/CFCATCH block around the second task and do
some kind of logging or something on files that are unable to be cleaned up.

Fregas





----- Original Message -----
From: "Owens, Howard" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, December 20, 2002 2:15 PM
Subject: CFGurus ... your advice sought


> I'm trying to figure out the best way to deal with this issue ...
>
> I have an application that uses ImageMagick to convert PDFs to JPGs.
We're
> still in the alpha development stage here, but everything has been working
> fine until today ... today's images to process are very large.
>
> How things are supposed to work ...
>
> -- convert image
> -- if the convert works (FileExists() checking for the new JPG),
> -- move the JPG to the JPG folder
> -- delete the PDF
>     -- Else, move the PDF to the badPDF folder
>
> What started happening with these large PDFs is that CF would try to move
> the PDF before ImageMagick released it, so CF would throw an error.
>
> So, I installed CF_Wait ... but that isn't working either, because if I
> don't set "seconds" high enough, CF still tries to move the file too soon,
> and if I set the number too high, CF gives me a server busy error.
>
> So, what I was thinking about doing is storing an array/structure in a
> session variable and recording whether the processing results, then later
> (in my "clean up" template), doing the necessary moves and deletes of
these
> files.
>
> Now, here's a wrinkle I'm concerned about -- all of these templates in
this
> application (about six or seven of them) will run via CFSchedule at about
5
> minute intervals.  Will session variables stay active for each step of
these
> scheduled runs?  Do session variables work with CFScheduled templates?
>
> If not, other suggestions? Or, even so, any better ideas out there?
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Howard Owens
> Internet Operations Coordinator
> InsideVC.com/Ventura County Star
> [EMAIL PROTECTED]
> AIM: GoCatGo1956
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

Reply via email to