PHPackages                             ym-careers/celery-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. ym-careers/celery-php

ActiveLibrary[Caching](/categories/caching)

ym-careers/celery-php
=====================

PHP client for Celery task queue

v1.0.1(7y ago)218.0k↓72.4%BSD-2-ClausePHPPHP &gt;=5.4.0

Since May 23Pushed 7y ago1 watchersCompare

[ Source](https://github.com/ymcareers/celery-php)[ Packagist](https://packagist.org/packages/ym-careers/celery-php)[ RSS](/packages/ym-careers-celery-php/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (3)Versions (4)Used By (0)

PHP client capable of executing [Celery](http://celeryproject.org/) tasks and reading asynchronous results.

Uses [AMQP extension from PECL](http://www.php.net/manual/en/amqp.setup.php), the [PHP AMQP implementation](https://github.com/php-amqplib/php-amqplib) or Redis and the following settings in Celery:

```
result_serializer = 'json'
result_expires = None
task_track_started = False

```

The required PECL-AMQP version is at least 1.0. Last version tested is 1.4.

Last PHP-amqplib version tested is 2.5.1.

Last predis version tested is 1.0.1.

Last Celery version tested is 3.1.19 (but check out the [celery4 branch](https://github.com/gjedeer/celery-php/tree/celery4))

[API documentation](https://massivescale.net/celery-php/li_celery-php.html) is dead, [help wanted](https://github.com/gjedeer/celery-php/issues/82)

POSTING TASKS
-------------

[](#posting-tasks)

```
$c = new \Celery\Celery('localhost', 'myuser', 'mypass', 'myvhost');
$result = $c->PostTask('tasks.add', array(2,2));

// The results are serializable so you can do the following:
$_SESSION['celery_result'] = $result;
// and use this variable in an AJAX call or whatever

```

*tip: if using RabbitMQ guest user, set "/" vhost*

READING ASYNC RESULTS
---------------------

[](#reading-async-results)

```
while (!$result->isReady())    {
    sleep(1);
    echo '...';
}

if ($result->isSuccess()) {
    echo $result->getResult();
} else {
    echo "ERROR";
    echo $result->getTraceback();
}

```

GET ASYNC RESULT MESSAGE
------------------------

[](#get-async-result-message)

```
$c = new \Celery\Celery('localhost', 'myuser', 'mypass', 'myvhost');
$message = $c->getAsyncResultMessage('tasks.add', 'taskId');

```

PYTHON-LIKE API
---------------

[](#python-like-api)

An API compatible to AsyncResult in Python is available too.

```
$c = new \Celery\Celery('localhost', 'myuser', 'mypass', 'myvhost');
$result = $c->PostTask('tasks.add', array(2,2));

$result->get();
if ($result->successful()) {
    echo $result->result;
}

```

ABOUT
-----

[](#about)

Based on [this blog post](http://www.toforge.com/2011/01/run-celery-tasks-from-php/)and reading Celery sources. Thanks to Skrat, author of [Celerb](https://github.com/skrat/celerb) for a tip about response encoding. Created for the needs of my consulting work at [Massive Scale](http://massivescale.net/).

License is 2-clause BSD.

DEVELOPMENT
-----------

[](#development)

[Development process and goals.](DEVELOPMENT.md)

CONNECTING VIA SSL
------------------

[](#connecting-via-ssl)

Connecting to a RabbitMQ server that requires SSL is currently only possible via PHP-amqplib to do so you'll need to create a celery object with ssl options:

```
$ssl_options = [
    'cafile' => 'PATH_TO_CA_CERT_FILE',
    'verify_peer' => true,
    'passphrase' => 'LOCAL_CERT_PASSPHRASE',
    'local_cert' => 'PATH_TO_COMBINED_CLIENT_CERT_KEY',
    'CN_match' => 'CERT_COMMON_NAME'
];

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

```

CONNECTING TO REDIS
-------------------

[](#connecting-to-redis)

Refer to files in `testscenario/` for examples of celeryconfig.py.

```
$c = new \Celery\Celery(
    'localhost', /* Server */
    '', /* Login */
    'test', /* Password */
    'wutka', /* vhost */
    'celery', /* exchange */
    'celery', /* binding */
    6379, /* port */
    'redis' /* connector */
);

```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~120 days

Total

2

Last Release

2841d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/21a9085bf69c801ca025d7c503a1cbebe0269fd75f18d963d5b0ff2426d8e183?d=identicon)[dev.careers@yourmembership.com](/maintainers/dev.careers@yourmembership.com)

---

Top Contributors

[![ymcareers](https://avatars.githubusercontent.com/u/39136146?v=4)](https://github.com/ymcareers "ymcareers (4 commits)")

---

Tags

redisqueuecronAMQPtaskcelerypython

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ym-careers-celery-php/health.svg)

```
[![Health](https://phpackages.com/badges/ym-careers-celery-php/health.svg)](https://phpackages.com/packages/ym-careers-celery-php)
```

###  Alternatives

[javibravo/simpleue

Php package to manage queue tasks in a simple way

131348.6k1](/packages/javibravo-simpleue)[enqueue/redis

Message Queue Redis Transport

445.7M31](/packages/enqueue-redis)[enqueue/magento2-enqueue

Message Queue solutions for Magento2. Supports RabbitMQ, AMQP, STOMP, Amazon SQS, Kafka, Redis, Google PubSub, Gearman, Beanstalk, Google PubSub

4918.8k](/packages/enqueue-magento2-enqueue)[resquebundle/resque

A Symfony 4 bundle to manage Resque job queues

51139.2k1](/packages/resquebundle-resque)[spinx/sidekiq-job-php

Push and schedule jobs to Sidekiq from PHP

37236.2k](/packages/spinx-sidekiq-job-php)[yangusik/laravel-balanced-queue

Laravel queue management with load balancing between partitions (user groups)

8514.4k](/packages/yangusik-laravel-balanced-queue)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
