When I use the 'reserve' operation in beanstalked, it is blocked for a long time

151 views Asked by At

I need to use beanstalked in my project.So I download the 1.1 version. I use the beanstalkc for python client. A simple Producer-Consumer model.

Producer:

       import beanstalkc
       beanstalk = beanstalkc.Connection('localhost')
       beanstalk.use('foo')
       beanstalk.put('hello')
       beanstalk.put('world')

Consumer:

      import beanstalkc
      beanstalk.use('foo')
      beanstalk = beanstalkc.Connection('localhost')
      job = beanstalk.reserve()

But the reserve operation is blocked for a long time.Has anybody encounter this problem?

0

There are 0 answers