- **Removed support for PHP 5.3.**
- celery-php now uses a PSR-4 compliant namespace, `Celery`. To migrate to the
new version, change code from `new Celery(…)` to `new \Celery\Celery(…)`.
- Now supports php-amqplib/php-amqplib for the amqplib backend as
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.
- celery-php now uses Celery task protocol version 2 and requires Celery 4.0+.
Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
Unreleased
[v0.5.5](https://github.com/rusty-celery/rusty-celery/releases/tag/v0.5.5) - 2023-09-25
Fixed
- Replaced unnecessary `println!` with `log::info!`.
[v0.5.4](https://github.com/rusty-celery/rusty-celery/releases/tag/v0.5.4) - 2023-09-11
Fixed
- Skip warning about redis heartbeat when not necessary.
[v0.5.3](https://github.com/rusty-celery/rusty-celery/releases/tag/v0.5.3) - 2023-02-28
Fixed
- `BrokerBuilder` is now `Send + Sync`.
[v0.5.2](https://github.com/rusty-celery/rusty-celery/releases/tag/v0.5.2) - 2023-02-20
Changed
- Store a reference to the Celery app in Request.
Fixed
- Fixed compilation issue on Windows.
[v0.5.1](https://github.com/rusty-celery/rusty-celery/releases/tag/v0.5.1) - 2023-02-16
Fixed
- Bumped base64 to it's latest and safest version
- Bumped tokio to it's latest version
- Bumped rmp-serde to it's latest version
- Bumped serde_yaml to it's latest version
- Bumped uuid to it's latest version
- Bumped once_cell to it's latest version
- Bumped redis to it's latest version
- Bumped env_logger to it's latest version
- Bumped mypy to it's latest version
- Bumped black to it's latest version
- Bumped flake8 to it's latest version
[v0.5.0](https://github.com/rusty-celery/rusty-celery/releases/tag/v0.5.0) - 2023-02-14
Changed
- Changed Celery type to be broker agnostic, allowing broker to be chosen dynamically at runtime.
[v0.4.0](https://github.com/rusty-celery/rusty-celery/releases/tag/v0.4.0) - 2023-02-03
Fixed
- Bumped Lapin to it's latest and safest version
- Bumped black to it's latest version, since current was breaking
Added
- Add explicit feature support for rustls/native-tls
[v0.4.0-rcn.11](https://github.com/rusty-celery/rusty-celery/releases/tag/v0.4.0-rcn.11) - 2021-10-07
Fixed
- Fixed SemVer ordering.
[v0.4.0-rc10](https://github.com/rusty-celery/rusty-celery/releases/tag/v0.4.0-rc10) - 2021-08-30
Fixed
- Fixed another bug with the `app!` and `beat!` related to issue [250](https://github.com/rusty-celery/rusty-celery/issues/250).
[v0.4.0-rc8](https://github.com/rusty-celery/rusty-celery/releases/tag/v0.4.0-rc8) - 2021-08-05
Changed
- ⚠️ **BREAKING CHANGE** ⚠️
The `RegularSchedule` in the `beat` module has been renamed to `DeltaSchedule` to
be more coherent with Python Celery terminology, where it is sometimes called *timedelta*.
- Tokio updated to 1.0.0.
- The `Broker::configure_task_routes` produces `BrokerError` instead of `CeleryError`.
- The `beat` macro now expects a list of tasks that is used to initialize the scheduler.
- Errors have been refactored:
* The `BadRoutingPattern` variant has been moved from `CeleryError` to `BrokerError`;
* The `CronScheduleError` has been replaced by a `ScheduleError` enum with a `CronScheduleError` variant;
* A `ScheduleError` variant has been added to `BeatError`
* A `BadRoutingPattern` error has been added.
Added
- 🚀🚀 Redis broker support 🚀🚀
- Added the `max_sleep_duration` property on the `Beat` which can be used to ensure that
the scheduler backend is called regularly (which may be necessary for custom backends).
- Added a method `Beat::schedule_named_task` to add a scheduled task with a custom name.
- Added a method `Broker::cancel` to cancel an existing consumer.
- Changed `Ok` variant type of the the return type of `Broker::consume`. This is now a tuple that includes a unique
consumer tag that can then be passed to `Broker::cancel` to cancel the corresponding consumer.
- Added a "coverage" job to GitHub Actions.
- Completed MessageBuilder struct
Fixed
- Fixed a bug with `AMQPBroker::close()` that would result in an error with `lapin`.
- Fixed a bug with the `celery::app!` macro that caused it to fail to compile when the broker connection string was passed as a variable instead of an expression.
[v0.4.0-rc5](https://github.com/rusty-celery/rusty-celery/releases/tag/v0.4.0-rc5) - 2020-11-19
Added
- Added the `CronSchedule` struct to support Celery's
[crontab](https://docs.celeryproject.org/en/stable/reference/celery.schedules.html#celery.schedules.crontab)
schedules.
Changed
- ⚠️ **BREAKING CHANGE** ⚠️
To improve the `app!` and `beat!` macros and accommodate custom `Broker`s and `SchedulerBackend`s,
we've had to make breaking changes to the way these macros are invoked.
The biggest change is that the macros now return a future of `Result<Celery>` or `Result<Beat>`.
This means you must now call `.await?` on the return value of the macro.
The other change is that you must now supply the actual `Broker` type.
Previously, you could write something like `broker = AMQP { "amqp://my-broker-url" }`,
but now you have to write it like `broker = celery::broker::AMQPBroker { "amqp://my-broker-url" }`.
For a concrete example of these changes, the old way looked like this:
rust
[tokio::main]
async fn main() -> anyhow::Result<()> {
let app = celery::app!(
broker = AMQP { "amqp://my-broker-url" },
tasks = [add],
task_routes = ["*" => "celery"],
);
// ...
Ok(())
}
Whereas now that will look like this:
rust
[tokio::main]
async fn main() -> anyhow::Result<()> {
let app = celery::app!(
broker = celery::broker::AMQPBroker { "amqp://my-broker-url" },
tasks = [add],
task_routes = ["*" => "celery"],
).await?;
// ...
Ok(())
}
- Celery apps no longer need to have static lifetimes. To remove this constraint, we changed
`Celery::consume` to take `&Arc<Self>` instead of a static reference to `self`.
- Now using `tokio-amqp` internally with `lapin`.
- Drop explicit dependency on amq-protocol.
Fixed
- Task ID now logged when a beat app sends a task.
- Fixes to docs. Added a "Build Docs" job to GitHub Actions.
- Fixed a Celery beat [issue](https://github.com/rusty-celery/rusty-celery/issues/199)
that caused a task to be dropped if its scheduled run was delayed