Skip to content
This repository was archived by the owner on Nov 30, 2021. It is now read-only.

Conversation

@lexabug
Copy link
Contributor

@lexabug lexabug commented Dec 22, 2017

Fixed doc block of the Celery constructor.
$persistent_messages parameter wasn't passed further to queue declaration.
$connector arg defaults to null since it better fits "not specified" value.

$persistent_messages parameter wasn't passed further to queue declaration.
$connector arg defaults to null since it better fits "not specified" value.
public function __construct($host, $login, $password, $vhost, $exchange='celery', $binding='celery', $port=5672, $connector=null, $persistent_messages=false, $result_expire=0, $ssl_options=[])
{
$broker_connection = [
$backend_connection = $broker_connection = [
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the purpose of defining the same array twice?

'binding' => $binding,
'port' => $port,
'connector' => $connector,
'connector' => $connector !== false ? $connector : null,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

false is no longer the default, so you can drop this ternary.

@jdufresne
Copy link
Collaborator

@lexabug Thanks!

Can you rebase this on the latest master. Would it be possible to add a test for $persistent_messages?

Can you also update the example in the README? The connector argument should now be null:

./README.md\093:    $c = new \Celery\Celery($host, $user, $password, $vhost, 'celery', 'celery', 5671, false, false, 0, $ssl_options);

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants