This repository has been archived by the owner on Nov 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 120
$persistent_messages parameter wasn't passed further to queue declaration #112
Open
lexabug
wants to merge
4
commits into
gjedeer:master
Choose a base branch
from
lexabug:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
b1a6abb
Fixed doc block of the Celery constructor.
lexabug 9818dab
Converting $connector = false to null for backward compatibility with…
lexabug cd19ad4
Python's Celery creates the following binding exchange "celery" - rou…
lexabug 843b70d
Merge branch 'master' into master
gjedeer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,34 +53,37 @@ | |
class Celery extends CeleryAbstract | ||
{ | ||
/** | ||
* @param string host | ||
* @param string login | ||
* @param string password | ||
* @param string vhost AMQP vhost, may be left empty or NULL for non-AMQP backends like Redis | ||
* @param string exchange AMQP exchange to use. For Redis it maps to queue key name. See CELERY_DEFAULT_EXCHANGE in Celery docs. (set to 'celery' when in doubt) | ||
* @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 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 | ||
* @param string $host | ||
* @param string $login | ||
* @param string $password | ||
* @param string $vhost AMQP vhost, may be left empty or NULL for non-AMQP backends like Redis | ||
* @param string $exchange AMQP exchange to use. For Redis it maps to queue key name. See CELERY_DEFAULT_EXCHANGE in Celery docs. (set to 'celery' when in doubt) | ||
* @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) | ||
* @see {http://docs.celeryproject.org/en/latest/userguide/optimizing.html#using-transient-queues} | ||
* @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=null, $persistent_messages=false, $result_expire=0, $ssl_options=[]) | ||
{ | ||
$broker_connection = [ | ||
$backend_connection = $broker_connection = [ | ||
'host' => $host, | ||
'login' => $login, | ||
'password' => $password, | ||
'vhost' => $vhost, | ||
'exchange' => $exchange, | ||
'binding' => $binding, | ||
'port' => $port, | ||
'connector' => $connector, | ||
'connector' => $connector !== false ? $connector : null, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
'persistent_messages' => $persistent_messages, | ||
'result_expire' => $result_expire, | ||
'ssl_options' => $ssl_options | ||
]; | ||
$backend_connection = $broker_connection; | ||
|
||
$items = $this->BuildConnection($broker_connection); | ||
$items = $this->BuildConnection($backend_connection, true); | ||
$this->BuildConnection($broker_connection); | ||
$this->BuildConnection($backend_connection, true); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?