Queue peek?

Aahz aahz at pythoncraft.com
Mon Mar 8 20:47:58 EST 2010


In article <58f61382-ac79-46fb-8612-a3c9fde297dc at c16g2000yqd.googlegroups.com>,
Veloz  <michaelveloz at gmail.com> wrote:
>
>The "peek" parts comes in when the user comes back later to see if
>their report has done. That is, in my page controller logic, I'd like
>to look through the complete queue and see if the specific report has
>been finished (I could tell by matching up the ID of the original
>request to the ID in the completed queue). If there was an item in the
>queue matching the ID, it would be removed.

Here's the question: what happens when the user refreshes the "report
done" page?  The problem with the way you're doing it is that checking
for report done is a one-shot operation.  You probably want to use a
database to cache this and have some kind of cache expiration.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"Many customs in this life persist because they ease friction and promote
productivity as a result of universal agreement, and whether they are
precisely the optimal choices is much less important." --Henry Spencer



More information about the Python-list mailing list