diff --git a/celery.md b/celery.md index 5d099e0..24bd23c 100644 --- a/celery.md +++ b/celery.md @@ -14,19 +14,28 @@ The easiest way to get going is to [download and install Redis](https://redis.io (if you don't already have it) and then run: ```python -celery -A {{ project_name }} worker -l info +celery -A {{ project_name }} worker -l info --pool=solo ``` -### Running Celery on Windows +Note that the 'solo' pool is recommended for development but not for production. When running in production, +you should use a more robust pool implementation such as `prefork` (for CPU bound tasks) or `gevent` (for I/O bound +tasks). -Celery 4.x [no longer officially supports Windows](https://docs.celeryq.dev/en/4.0/whatsnew-4.0.html#removed-features). -To use Celery on Windows for development or test purposes, change the concurrency pool implementation to ``gevent`` instead. +### Running Celery with Gevent + +The `gevent` pool is useful when running tasks that are I/O bound which tends to be 90% of tasks. The same +configuration can also be used to run Celery on Windows (if the `solo` pool is not suitable) since +Celery 4.x [no longer officially supports Windows](https://docs.celeryq.dev/en/4.0/whatsnew-4.0.html#removed-features). + +To use the `gevent` pool, change the concurrency pool implementation to ``gevent`` instead. ``` console pip install gevent celery -A {{ project_name }} worker -l info -P gevent ``` +For more information see the [Celery documentation](https://docs.celeryq.dev/en/stable/userguide/concurrency/gevent.html). + ## Setup and Configuration The above setup uses [Redis](https://redis.io/) as a message broker and result backend. diff --git a/release-notes.md b/release-notes.md index 6e466e3..7ee0e93 100644 --- a/release-notes.md +++ b/release-notes.md @@ -3,6 +3,45 @@ Version History and Release Notes Releases of [SaaS Pegasus: The Django SaaS Boilerplate](https://www.saaspegasus.com/) are documented here. +## Version 2024.8.1 + +This is a maintenance release which upgrades HTMX to version 2.0 and fixes a handful of minor bugs. + +### Changed + +- **Upgraded HTMX to [version 2.0](https://htmx.org/posts/2024-06-17-htmx-2-0-0-is-released/).** + See upgrade note below. + +### Fixed + +- Fixed a bug on some environments where `make build-api-client` would wrong relative to the wrong directory. + (Thanks Ben for finding and fixing!) +- Downgraded Postgres from 16 to 14 on Digital Ocean deployments, due to + [an issue with permissions on version 16](https://www.digitalocean.com/community/questions/how-can-i-create-a-postgres-16-user-that-has-permission-to-create-tables-on-an-app-platform-dev-database) + that was causing new Digital Ocean deployments to fail. + (Thanks Panagiotis for reporting!) +- Switched the default celery pool to [solo](https://docs.celeryq.dev/en/stable/internals/reference/celery.concurrency.solo.html) in development, + to fix issues running on Windows. See [updated docs](./celery.md). +- Updated in-app help hint to recommend running `./manage.py bootstrap_ecommerce` instead of `./manage.py djstripe_sync_models price`. + +### Upgrading + +Htmx 2.0 requires loading new extensions. +If you were loading HTMX extensions in your own templates, you will have to upgrade the location of those to the 2.0 versions. + +Before: + +``` +<script src="https://unpkg.com/htmx.org/dist/ext/ws.js" defer></script> +``` + +After: +``` +<script src="https://unpkg.com/htmx-ext-ws@2.0.0/ws.js" defer></script> +``` + +*August 13, 2024* + ## Version 2024.8 This is a maintenance release with many small updates and fixes.