-
Notifications
You must be signed in to change notification settings - Fork 120
Conversation
Conflicts: celery.php
…en defining arrays for connection details
Wow. This is a huge change. I appreciate the effort but not only it breaks the current API, it also deletes the inline phpdocumentor documentation, so I'm not going to merge it as is. If you want to see these changes merged, please fix these problems. Otherwise it needs to wait until somebody - perhaps me - has the time to do it without breaking existing code. |
I will see what I can do. If you by chance caught my modifications to AsyncResult I have removed those (I don't feel they are quite ready to be merged yet and included them by accident) |
Yeah, these too. Also the change in constructor arguments - we can't have breaking changes like this. Yesterday I've updated celery-php in a project I wrote in 2011 for a client and after "git pull" it worked like nothing happened. This is the level of stability this project is aiming at. |
… have been changed to connect via the old method as well. Setting the backend on Celery and connecting with arrays can be done using the class CeleryWithBackend
I have added a new commit. This will allow the class Celery to be used as it has always been and included a new class CeleryWithBackend (lack of a better name) that will be setup by passing the two arrays. I couldn't come up with a better way to do this so any feedback you have to offer would be appreciated. I will work out my documentation breaking later on today if this seems to fit for you. |
Sorry it took so long to merge, your PR still required some work to be usable and I was too busy with paid work. |
Not a problem at all. It is your project so you need to ensure quality is maintained. I am glad my changes were able to help out. |
This pull request will allow the user to specify a separate broker from their back end. So using Redis for results and rabbitmq for pushing tasks. The Celery Constructor will now take two arrays as parameters the first being connection details for the broker and the second being (optionally) connection details for the back end. A simple array would look like this.
$brokerConnection = array(
"host" => "localhost",
"login" => "gdr",
"password" => "test",
"vhost" => "wutka",
"exchange" => "celery",
"binding" => "celery",
"port" => 5672,
"connector" => "php-amqplib"
);
$c = new Celery($brokerConnection);