当我在beanstalked中使用“reserve”操作时,它被阻塞了很长一段时间

2024-05-02 16:06:33 发布

您现在位置:Python中文网/ 问答频道 /正文

我需要在我的房间里用豆茎项目。所以呢我下载了1.1版本。 我使用beanstalkc for python客户端。 一个简单的生产者-消费者模型。你知道吗

制作人:

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

消费者:

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

但储备业务长期受阻时间到了。有有人遇到这个问题吗?你知道吗


Tags: 项目import版本localhost客户端forfooput