Asp classic 在经典asp中创建进程队列

Asp classic 在经典asp中创建进程队列,asp-classic,queue,Asp Classic,Queue,问题是: 有一个经典的asp应用程序,它调用lame.exe对MP3进行编码,每天有很多时间 而且无法控制从多个用户调用lame.exe的方式,换句话说,没有用于此目的的队列。 下面是我的想法: //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

问题是: 有一个经典的asp应用程序,它调用lame.exe对MP3进行编码,每天有很多时间 而且无法控制从多个用户调用lame.exe的方式,换句话说,没有用于此目的的队列。 下面是我的想法:

//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 and process_flag is undone
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
所以我只想知道有没有更好的解决办法? 还有其他的方法吗


注意。

看起来是经典asp的合理方法

只需确保在您的
checkQ
函数中,您仅检索
process\u标志设置为
undone
的队列项目,或者您可能试图反复重新处理相同的项目


阅读文章了解使用MSMQ的另一种方法-它首先创建一个新的公共队列,然后从asp页面向其发送消息。它还需要一个额外的可执行文件来处理排队的项目。

这是MSMQ的完美应用程序。让经过验证的代码处理可靠的消息传递、并发控制等,这样您就可以只关注应用程序逻辑了。

哦,我忘了补充一点,实际上是这样的,但我仍在等待其他方法,我是说比我做得更好的方法。“你好!”奥斯汀·鲍尔斯——是的,我明白。我认为你的方法很好。