create a queue of process in classic asp

Posted by austin powers on Stack Overflow See other posts from Stack Overflow or by austin powers
Published on 2010-04-19T19:04:47Z Indexed on 2010/04/19 19:13 UTC
Read the original article Hit count: 255

Filed under:
|

Hi,

here is the problem : there is classic asp app which is calling lame.exe for encoding mp3s for lots of time per day and there is no control of the way of calling lame.exe from several users in another word there is no queue for that purpose. so here is what I am thinking about :

//below code all are pseudo-code
//process_flag and mp3 and processId all are reside in a database

function addQ(string mp3)
add a record to database 
and set process_flag to undone
then goto checkQ
end function

function checkQ()
if there is a process in queue list
sort in by processID asc
for each processID
    processQ(processID)
end for
end function

function ProcessQ(int processID)
run lame.exe with the help of wscript.exe
after doing the job set the process_flag to done
end function

so I just want to know is there any better solution? or any other approaches out there?

regards.

© Stack Overflow or respective owner

Related posts about asp

Related posts about queue