Skip to content

support task-priorities when use RabbitMQ / Redis as broker #189

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Oct 27, 2018

Conversation

b1ngz
Copy link
Contributor

@b1ngz b1ngz commented Oct 23, 2018

According to the official docs, celery support task-priorities when use RabbitMQ or Redis as broker, and in Advanced Options section, there is a priority option

  • priority

    A number between 0 and 255, where 255 is the highest priority.

    Supported by: RabbitMQ, Redis (priority reversed, 0 is highest).

So i add priority field for model PeriodicTasks to support task-priorities.

@b1ngz
Copy link
Contributor Author

b1ngz commented Oct 23, 2018

And I saw Travis CI build failed due to line too long in the new migration file

/home/travis/build/celery/django-celery-beat/django_celery_beat/migrations/0006_periodictask_priority.py:10:80: E501 line too long (106 > 79 characters)

which code line is:

 ('django_celery_beat', '0005_add_solarschedule_events_choices_squashed_0009_merge_20181012_1416'),

The dependent squashed migration filename is too long. Any idea how to fix it?

@b1ngz
Copy link
Contributor Author

b1ngz commented Oct 25, 2018

Thanks. 😫 But ci still fail due to

/home/travis/build/celery/django-celery-beat/django_celery_beat/tzcrontab.py:73:21: W504 line break after binary operator
/home/travis/build/celery/django-celery-beat/django_celery_beat/tzcrontab.py:74:21: W504 line break after binary operator
...

These code is already in master, should i make some change to fix it?

@b1ngz
Copy link
Contributor Author

b1ngz commented Oct 27, 2018

Line break before a binary operator is more readable, but after modified, the CI still failed.

After google for this, I found the result of W503 and W504 are weird which cause CI failed, so i add them to the ignore list.

@thedrow thedrow merged commit 1bcf81b into celery:master Oct 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant