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

Revert "Remove unused Celery::__construct() argument $persistent_messages" #118

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 0 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,3 @@
videlalvaro/php-amqplib is abandoned.
- Fix crash with the ampqlib backend when Celery has not yet created the
results exchange.
- The `Celery` constructor no longer accepts the argument
`persistent_messages`. It was previously unused.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ options:
'CN_match' => 'CERT_COMMON_NAME'
];

$c = new \Celery\Celery($host, $user, $password, $vhost, 'celery', 'celery', 5671, false, 0, $ssl_options);
$c = new \Celery\Celery($host, $user, $password, $vhost, 'celery', 'celery', 5671, false, false, 0, $ssl_options);

## CONNECTING TO REDIS

Expand Down
4 changes: 3 additions & 1 deletion src/Celery.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,12 @@ class Celery extends CeleryAbstract
* @param string binding AMQP binding a.k.a. routing key. See CELERY_DEFAULT_ROUTING_KEY. (set to 'celery' when in doubt)
* @param int port
* @param string connector Which connector library to use. One of: 'pecl', 'php-amqplib', 'php-amqplib-ssl', 'redis'
* @param bool persistent_messages False = transient queue, True = persistent queue. Check "Using Transient Queues" in Celery docs (set to false when in doubt)
* @param int result_expire Expire time for result queue, milliseconds (for AMQP exchanges only)
* @param array ssl_options Used only for 'php-amqplib-ssl' connections, an associative array with values as defined here: http://php.net/manual/en/context.ssl.php
*/
public function __construct($host, $login, $password, $vhost, $exchange='celery', $binding='celery', $port=5672, $connector=false, $result_expire=0, $ssl_options=[])

public function __construct($host, $login, $password, $vhost, $exchange='celery', $binding='celery', $port=5672, $connector=false, $persistent_messages=false, $result_expire=0, $ssl_options=[])
{
$broker_connection = [
'host' => $host,
Expand Down