in reply to Managing a web form submission work queue

I'm glad to have found this discussion as I am facing a similar issue. It seems the consensus for managing work-in-progress is via a status field in the work queue database. That's the approach I was considering so am glad to see it validated.

However, none of the posters who suggested this method gave any input about how to recover from error conditions. How does the script know if a record marked as 'in-progress' is actually being worked, is stalled (because the user took a lunch break), or needs to be returned to the queue because of a system crash, user error or other anomaly?

In my case, each user has an id which I plan to use for checking if there is already a record being worked by this user. It won't catch stalled records if the user doesn't return which is not ideal. I could get around that by adding an additional expiration check for nn minutes/hours/days. Any other suggestions/comments would be most appreciated.

Thanks,
William

  • Comment on Re: Managing a web form submission work queue

Replies are listed 'Best First'.
Re: Re: Managing a web form submission work queue
by Limbic~Region (Chancellor) on May 12, 2004 at 12:53 UTC
    knowmad,
    I ended up using Parallel::ForkManager. It offers a few callbacks that can hook to custom code to verify this. Since this is a application specific type of verifiecation, I think the way it was abstracted in the module was perfect for my needs.

    Hope this helps - L~R

      L ~ R,

      Thanks for your reply. I looked into Parallel::ForkManager but don't really see how you are using it to manage a work queue for a web application. Do you keep a forked process open until the user submits the form? Which callbacks are you using?

      Thanks for your feedback,
      William

        knowmad,
        My situation is different than yours. That is why I said it was perfect for my needs. I was using WWW::Mechanize for form submission and not users. The run_on_(start|finish|wait) were the callbacks I needed to make sure things were going properly. I am sorry this doesn't fit your situation, but it worked great for me.

        Cheers - L~R