Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions queue/beanstalk.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ function _beanstalk_connection($config_key)
{/*{{{*/
static $configs = [];
static $container = [];
if (empty($config_key)) {
$configs = null;
$container = null;
return null;
}

if (empty($configs)) {
$configs = config('beanstalk');
Expand All @@ -26,11 +31,12 @@ function _beanstalk_connection($config_key)
}/*}}}*/

function _beanstalk_disconnect($fp)
{/*{{{*/
_beanstalk_connection_write($fp, 'quit');

return fclose($fp);
}/*}}}*/
{
_beanstalk_connection_write($fp, 'quit');
fclose($fp);
_beanstalk_connection([]);
return true;
}

function _beanstalk_connection_read($fp)
{/*{{{*/
Expand Down Expand Up @@ -182,7 +188,7 @@ function _beanstalk_ignore($fp, $tube)
return (integer) strtok(' ');
case 'NOT_IGNORED':
default:
$this->_error($status);
throw new Exception($status);
return false;
}
}/*}}}*/
Expand Down