【问题标题】:what's the difference phalcon beanstalk queue's choose and watch methodsphalcon beanstalk queue的choose和watch方法有什么区别
【发布时间】:2015-04-09 01:25:14
【问题描述】:

phalcon beanstalk 队列的选择和观察方法有什么区别。 两者的cmets是一样的。

namespace Phalcon\Queue {
        ...
        /**
         * Change the active tube. By default the tube is 'default'
         *
         * @param string $tube
         * @return string|boolean
         */
        public function choose($tube){ }


        /**
         * Change the active tube. By default the tube is 'default'
         *
         * @param string $tube
         * @return string|boolean
         */
        public function watch($tube){ }
        ...
}

【问题讨论】:

    标签: php phalcon beanstalkd


    【解决方案1】:

    “watched”队列是客户端从中保留作业的管道。 “已使用”队列是客户端将作业放入的管道。

    有用吗?我认为这里的 Phalcon 文档太短了。应该改进!

    Phalcon 2.0 代码:

    choose() 方法: https://github.com/phalcon/cphalcon/blob/2.0.0/phalcon/queue/beanstalk.zep#L182

    watch() 方法: https://github.com/phalcon/cphalcon/blob/2.0.0/phalcon/queue/beanstalk.zep#L202

    Beanstalkd 文档片段: http://beanstalkc.readthedocs.org/en/latest/tutorial.html#tube-management

    我一直阅读 Phalcon 2.0 的代码,因为它是用 Zephir 编写的,看起来像 PHP,比 Phalcon 1.x.x 的 C 代码更容易理解

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-11-14
      • 1970-01-01
      • 2022-06-24
      • 1970-01-01
      • 1970-01-01
      • 2015-09-14
      • 1970-01-01
      相关资源
      最近更新 更多