| merlyn | children look at first table for status = todo they set status = in progress |
| EricL | merlyn: But how do I then prevent the children from downloading the same link multiple times. |
| merlyn | and then grab data from second table of what specifically to do with that URL YOU HAVE SET THE STATUS TO IN PROGRESS only one kid can set it from todo to in progress that's your gating id - url - status = table 1 |
| EricL | But then that kid has to have a knowledge of the entire table returned, no? |
| merlyn | No he picks SELECT url FROM table1 WHERE status = "todo" LIMIT 1 inside a transaction then UPDATE table1 SET status = "in progress" WHERE url = THAT URL then commit if the comit fails, someone else got it |
| EricL | Oh, you're saying create a temporary table. |
| merlyn | NO A REAL TABLE fuck a status table of how the parent tells the kids what to do this is standard database stuff |
| action | merlyn sighs |
| merlyn | sighs |
| EricL | I understand that database stuff. |
| merlyn | parent sets up big table of "url" "todo" kids all eat from that table each kid is responsible for getting the next thing that is "todo" and updating the status to "in progress" |
| EricL | Oh, I got it now. |
| merlyn | when done, update status to "done" finally! :) I do believe my link-checker-with-class-dbi does this |
| EricL | Hmmm, I didn't find that article. |
| merlyn | ... http://www.stonehenge.com/merlyn/LinuxMag/col52.html see kids_do actually, read the whole thing |
| dazjorz | LeoNerd: Ok, done. |
| merlyn | the only difference between that and yorus is that my column has kids also inserting additional tasks |
| dazjorz | LeoNerd: I made a runscript that does exactly what I want. |
| merlyn | yours won't have that |
| dazjorz | LeoNerd: I'll paste it so you know what I need too. |