main logo
Subject: [ProPython] paralel processing
Author: Carl Karsten
Posted: 2006/08/31 23:21:52
 
View Entire Thread
New Search


I have a MySql table with 100's of Names and phone numbers. These are people
who have an appointment for a person to show up at their house at 10am. The
goal is to call them at 10:10 and find out if the person showed up. If they
didn't, then we can get a 2nd person on the way and yell at the person who
didn't show up.

I have a box that can make phone calls, play a recording "did the rep show up?
1 for yes, 2 for no." and log the results. The box can handle 100's (maybe
1000's?) of simultaneous calls.

I am guessing the average call will take 15 seconds. (dial, ring, ring...
answer, listen press button.) That means if I do one at a time, person #240
won't get called for an hour. The goal is to call them all at about 10 min
after the appointment time.

I have some python code that uses the twisted library to setup things like:
on_Pickup("do this") and on_dtmf("do that") and on_hangup("exit"). If you think
about it - it is just as event driven as a GUI app - you never know what the
crazy user is going to do next.

Anyone know how to make this happen?

guessing something like:

for lnProcess = 1 to 200:
Start_Processor( lnProcess )

def Start_Processor( lnProcess ):
some magic event loop driven thing that
grabs an unprocessed person,
call,
records the results,
repeat till no more unprocessed
this is probably 2 functions, or something. If I knew what it needed to be, I
wouldnt' be asking for help :)


or maybe even something that adds and removes jobs based on system load.

fun, eh?

Carl K



 
©2006 Carl Karsten
<-- Prior Message New Search Next Message -->