Skip to content

Commit

Permalink
Merge pull request #32 from taskiq-python/feature/github-flow
Browse files Browse the repository at this point in the history
  • Loading branch information
s3rius authored Aug 14, 2024
2 parents 8fdbc43 + 63fa139 commit 91b0e56
Show file tree
Hide file tree
Showing 10 changed files with 747 additions and 1,204 deletions.
104 changes: 0 additions & 104 deletions .flake8

This file was deleted.

4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "3.11"
- name: Install deps
run: poetry install
- name: Set verison
run: poetry version "${{ github.ref_name }}"
- name: Release package
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ jobs:
matrix:
cmd:
- black
- flake8
- isort
- ruff
- mypy
- autoflake
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -20,7 +18,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
python-version: "3.11"
cache: "poetry"
- name: Install deps
run: poetry install
Expand All @@ -43,7 +41,7 @@ jobs:
- 5672:5672
strategy:
matrix:
py_version: ["3.8", "3.9", "3.10", "3.11"]
py_version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v2
Expand Down
46 changes: 17 additions & 29 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,52 +6,40 @@ repos:
hooks:
- id: check-ast
- id: trailing-whitespace
exclude: 'README.md'
- id: check-toml
- id: end-of-file-fixer

- repo: https://github.com/asottile/add-trailing-comma
rev: v2.1.0
hooks:
- id: add-trailing-comma
- id: add-trailing-comma

- repo: local
hooks:
- id: black
name: Format with Black
entry: black
entry: poetry run black
language: system
types: [python]

- id: autoflake
name: autoflake
entry: autoflake
language: system
types: [ python ]
args: [ --in-place, --remove-all-unused-imports, --remove-duplicate-keys ]

- id: isort
name: isort
entry: isort
language: system
types: [ python ]

- id: flake8
name: Check with Flake8
entry: flake8
- id: ruff
name: Run ruff lints
entry: poetry run ruff
language: system
pass_filenames: false
types: [ python ]
args: [--count, taskiq_aio_pika]
types: [python]
args:
- "check"
- "--fix"
- "taskiq_aio_pika"
- "tests"

- id: mypy
name: Validate types with MyPy
entry: mypy
entry: poetry run mypy
language: system
types: [ python ]

- id: yesqa
name: Remove usless noqa
entry: yesqa
language: system
types: [ python ]
types: [python]
pass_filenames: false
args:
- ./taskiq_aio_pika
- ./tests
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ You can send delayed messages and set priorities to messages using labels.

To send delayed message, you have to specify
delay label. You can do it with `task` decorator,
or by using kicker.
or by using kicker.
In this type of delay we are using additional queue with `expiration` parameter and after with time message will be deleted from `delay` queue and sent to the main taskiq queue.
For example:

Expand Down Expand Up @@ -58,9 +58,9 @@ To send delayed message you can install `rabbitmq-delayed-message-exchange`
plugin https://github.com/rabbitmq/rabbitmq-delayed-message-exchange.

And you need to configure you broker.
There is `delayed_message_exchange_plugin` `AioPikaBroker` parameter and it must be `True` to turn on delayed message functionality.
There is `delayed_message_exchange_plugin` `AioPikaBroker` parameter and it must be `True` to turn on delayed message functionality.

The delay plugin can handle tasks with different delay times well, and the delay based on dead letter queue is suitable for tasks with the same delay time.
The delay plugin can handle tasks with different delay times well, and the delay based on dead letter queue is suitable for tasks with the same delay time.
For example:

```python
Expand Down
Loading

0 comments on commit 91b0e56

Please sign in to comment.