yiisoft / yiisoft/yii2-queue

Beanstalk status

Open
#238 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:bug
Dominant language
PHP
Stars
1.1k
Forks
285
Avg merge
5d 3h
Merged PRs (30d)
2

Description

What steps will reproduce the problem?

Run the status command when the configured tube does not exist.

What's expected?

Tubes in beanstalk are ephemeral; they are created and destroyed automatically.
Conceptually there's no difference between an empty tube and a non-existent one.

I expect to get similar output when running the info command.

What do you get instead?

An exception with a stack trace that suggests something is wrong:

Statistical information about the tube:
Exception 'Pheanstalk\Exception\ServerException' with message 'Server reported NOT_FOUND'

in /project/vendor/pda/pheanstalk/src/YamlResponseParser.php:36

Stack trace:
#0 /project/vendor/pda/pheanstalk/src/Connection.php(142): Pheanstalk\YamlResponseParser->parseResponse('NOT_FOUND', NULL)
#1 /project/vendor/pda/pheanstalk/src/Pheanstalk.php(396): Pheanstalk\Connection->dispatchCommand(Object(Pheanstalk\Command\StatsTubeCommand))
#2 /project/vendor/pda/pheanstalk/src/Pheanstalk.php(320): Pheanstalk\Pheanstalk->_dispatch(Object(Pheanstalk\Command\StatsTubeCommand))
#3 /project/vendor/yiisoft/yii2-queue/src/drivers/beanstalk/Queue.php(138): Pheanstalk\Pheanstalk->statsTube('queue')
#4 /project/vendor/yiisoft/yii2-queue/src/drivers/beanstalk/InfoAction.php(33): yii\queue\beanstalk\Queue->getStatsTube()
#5 [internal function]: yii\queue\beanstalk\InfoAction->run()
#6 /project/vendor/yiisoft/yii2/base/Action.php(94): call_user_func_array(Array, Array)
#7 /project/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\Action->runWithParams(Array)
#8 /project/vendor/yiisoft/yii2/console/Controller.php(148): yii\base\Controller->runAction('', Array)
#9 /project/vendor/yiisoft/yii2/base/Module.php(528): yii\console\Controller->runAction('', Array)
#10 /project/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('queue', Array)
#11 /project/vendor/yiisoft/yii2/console/Application.php(147): yii\console\Application->runAction('queue', Array)
#12 /project/vendor/yiisoft/yii2/base/Application.php(386): yii\console\Application->handleRequest(Object(yii\console\Request))
#13 /project/protected/yiic.php(20): yii\base\Application->run()
#14 /project/protected/yiic.php(21): {closure}()
#15 /project/protected/yiic(14): require_once('/project/protec...')
#16 {main}
Script docker-compose run --rm cli handling the cli event returned with error code 1
Additional info
Q A
Yii version 2.0.15.1
PHP version 7.2
Operating system alpine

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the beanstalk InfoAction.php entry point and follow its call to Queue.php getStatsTube(), using the reproduced status command and stack trace as the guide. Confirm how a missing tube is handled, then verify that the status output matches the info output without an exception.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.