fluxqueue 0.2.0__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fluxqueue-0.2.0 → fluxqueue-0.2.1}/Cargo.lock +2 -2
- fluxqueue-0.2.1/Cargo.toml +12 -0
- {fluxqueue-0.2.0 → fluxqueue-0.2.1}/PKG-INFO +2 -1
- fluxqueue-0.2.1/crates/fluxqueue-core/Cargo.toml +14 -0
- {fluxqueue-0.2.0 → fluxqueue-0.2.1/crates/fluxqueue-core}/src/lib.rs +1 -1
- {fluxqueue-0.2.0 → fluxqueue-0.2.1}/pyproject.toml +3 -2
- fluxqueue-0.2.1/python/fluxqueue/__init__.py +3 -0
- fluxqueue-0.2.0/fluxqueue/core.py → fluxqueue-0.2.1/python/fluxqueue/client.py +21 -6
- fluxqueue-0.2.0/.github/actions/build-package/action.yml +0 -39
- fluxqueue-0.2.0/.github/actions/build-worker/action.yml +0 -75
- fluxqueue-0.2.0/.github/actions/tests/action.yml +0 -33
- fluxqueue-0.2.0/.github/workflows/deploy-docs.yml +0 -33
- fluxqueue-0.2.0/.github/workflows/publish.yml +0 -68
- fluxqueue-0.2.0/.github/workflows/release-worker.yml +0 -55
- fluxqueue-0.2.0/.github/workflows/tests.yml +0 -68
- fluxqueue-0.2.0/.gitignore +0 -13
- fluxqueue-0.2.0/Cargo.toml +0 -28
- fluxqueue-0.2.0/docs/about.md +0 -5
- fluxqueue-0.2.0/docs/api/environment.md +0 -10
- fluxqueue-0.2.0/docs/api/fluxqueue.md +0 -14
- fluxqueue-0.2.0/docs/api/index.md +0 -7
- fluxqueue-0.2.0/docs/css/extra.css +0 -87
- fluxqueue-0.2.0/docs/how-it-works/client.md +0 -31
- fluxqueue-0.2.0/docs/how-it-works/index.md +0 -8
- fluxqueue-0.2.0/docs/how-it-works/worker.md +0 -58
- fluxqueue-0.2.0/docs/images/favicon.ico +0 -0
- fluxqueue-0.2.0/docs/images/logo.svg +0 -60
- fluxqueue-0.2.0/docs/images/logo_full.png +0 -0
- fluxqueue-0.2.0/docs/images/logo_white.svg +0 -30
- fluxqueue-0.2.0/docs/index.md +0 -41
- fluxqueue-0.2.0/docs/tutorial/defininig_and_exposing_tasks.md +0 -193
- fluxqueue-0.2.0/docs/tutorial/index.md +0 -12
- fluxqueue-0.2.0/docs/tutorial/installation.md +0 -36
- fluxqueue-0.2.0/docs/tutorial/quickstart.md +0 -115
- fluxqueue-0.2.0/docs/tutorial/worker.md +0 -280
- fluxqueue-0.2.0/examples/fastapi/README.md +0 -13
- fluxqueue-0.2.0/examples/fastapi/src/__init__.py +0 -0
- fluxqueue-0.2.0/examples/fastapi/src/email/__init__.py +0 -0
- fluxqueue-0.2.0/examples/fastapi/src/email/core.py +0 -17
- fluxqueue-0.2.0/examples/fastapi/src/main.py +0 -12
- fluxqueue-0.2.0/examples/fastapi/src/tasks/__init__.py +0 -3
- fluxqueue-0.2.0/examples/fastapi/src/tasks/core.py +0 -3
- fluxqueue-0.2.0/examples/fastapi/src/tasks/email.py +0 -16
- fluxqueue-0.2.0/fluxqueue/__init__.py +0 -3
- fluxqueue-0.2.0/mkdocs.yml +0 -88
- fluxqueue-0.2.0/scripts/build-worker.sh +0 -22
- fluxqueue-0.2.0/scripts/check-prettier.sh +0 -7
- fluxqueue-0.2.0/tests/__init__.py +0 -0
- fluxqueue-0.2.0/tests/conftest.py +0 -30
- fluxqueue-0.2.0/tests/test_core.py +0 -9
- fluxqueue-0.2.0/tests/test_tasks.py +0 -32
- fluxqueue-0.2.0/tests/test_utils.py +0 -12
- {fluxqueue-0.2.0 → fluxqueue-0.2.1}/LICENSE +0 -0
- {fluxqueue-0.2.0 → fluxqueue-0.2.1}/README.md +0 -0
- {fluxqueue-0.2.0 → fluxqueue-0.2.1}/crates/fluxqueue-common/Cargo.toml +0 -0
- {fluxqueue-0.2.0 → fluxqueue-0.2.1}/crates/fluxqueue-common/src/lib.rs +0 -0
- {fluxqueue-0.2.0 → fluxqueue-0.2.1}/crates/fluxqueue-common/src/redis/client.rs +0 -0
- {fluxqueue-0.2.0 → fluxqueue-0.2.1}/crates/fluxqueue-common/src/redis/keys.rs +0 -0
- {fluxqueue-0.2.0 → fluxqueue-0.2.1}/crates/fluxqueue-common/src/redis/mod.rs +0 -0
- {fluxqueue-0.2.0 → fluxqueue-0.2.1}/crates/fluxqueue-common/src/serialize.rs +0 -0
- {fluxqueue-0.2.0 → fluxqueue-0.2.1}/crates/fluxqueue-common/src/task.rs +0 -0
- /fluxqueue-0.2.0/fluxqueue/fluxqueue_core.pyi → /fluxqueue-0.2.1/python/fluxqueue/_core.pyi +0 -0
- {fluxqueue-0.2.0 → fluxqueue-0.2.1/python}/fluxqueue/utils/__init__.py +0 -0
- {fluxqueue-0.2.0 → fluxqueue-0.2.1/python}/fluxqueue/utils/task.py +0 -0
|
@@ -263,7 +263,7 @@ dependencies = [
|
|
|
263
263
|
|
|
264
264
|
[[package]]
|
|
265
265
|
name = "fluxqueue-worker"
|
|
266
|
-
version = "0.2.
|
|
266
|
+
version = "0.2.1"
|
|
267
267
|
dependencies = [
|
|
268
268
|
"anyhow",
|
|
269
269
|
"chrono",
|
|
@@ -286,7 +286,7 @@ dependencies = [
|
|
|
286
286
|
|
|
287
287
|
[[package]]
|
|
288
288
|
name = "fluxqueue_core"
|
|
289
|
-
version = "0.2.
|
|
289
|
+
version = "0.2.1"
|
|
290
290
|
dependencies = [
|
|
291
291
|
"deadpool-redis",
|
|
292
292
|
"fluxqueue-common",
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
[workspace]
|
|
2
|
+
members = ["crates/*"]
|
|
3
|
+
resolver = "3"
|
|
4
|
+
|
|
5
|
+
[workspace.package]
|
|
6
|
+
edition = "2024"
|
|
7
|
+
repository = "https://github.com/CCXLV/fluxqueue"
|
|
8
|
+
homepage = "https://fluxqueue.ccxlv.dev"
|
|
9
|
+
authors = ["Giorgi Merebashvili <mereba2627@gmail.com>"]
|
|
10
|
+
|
|
11
|
+
[workspace.dependencies]
|
|
12
|
+
fluxqueue-common = { path = "./crates/fluxqueue-common" }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fluxqueue
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Classifier: Development Status :: 5 - Production/Stable
|
|
5
5
|
Classifier: Intended Audience :: Developers
|
|
6
6
|
Classifier: Programming Language :: Python
|
|
@@ -31,6 +31,7 @@ Provides-Extra: tests
|
|
|
31
31
|
License-File: LICENSE
|
|
32
32
|
Summary: A lightweight, resource-efficient, high-throughput task queue for Python, written in Rust.
|
|
33
33
|
Keywords: task-queue,queue,redis,async,background-tasks,worker,rust,fluxqueue
|
|
34
|
+
Home-Page: https://fluxqueue.ccxlv.dev
|
|
34
35
|
Author-email: Giorgi Merebashvili <mereba2627@gmail.com>
|
|
35
36
|
License-Expression: Apache-2.0
|
|
36
37
|
Requires-Python: >=3.11, <3.15
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "fluxqueue_core"
|
|
3
|
+
version = "0.2.1"
|
|
4
|
+
repository.workspace = true
|
|
5
|
+
homepage.workspace = true
|
|
6
|
+
authors.workspace = true
|
|
7
|
+
edition.workspace = true
|
|
8
|
+
|
|
9
|
+
[dependencies]
|
|
10
|
+
pyo3 = { version = "0.27.2", features = ["experimental-async"] }
|
|
11
|
+
pyo3-async-runtimes = { version = "0.27.0", features = ["tokio-runtime"] }
|
|
12
|
+
tokio = { version = "1.49.0", features = ["rt-multi-thread", "sync"] }
|
|
13
|
+
deadpool-redis = { version = "0.22.1", features = ["rt_tokio_1"] }
|
|
14
|
+
fluxqueue-common.workspace = true
|
|
@@ -55,8 +55,9 @@ docs = [
|
|
|
55
55
|
build = ["maturin"]
|
|
56
56
|
|
|
57
57
|
[tool.maturin]
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
module-name = "fluxqueue._core"
|
|
59
|
+
python-source = "python"
|
|
60
|
+
manifest-path = "crates/fluxqueue-core/Cargo.toml"
|
|
60
61
|
|
|
61
62
|
[tool.ruff]
|
|
62
63
|
line-length = 88
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import inspect
|
|
2
|
-
from collections.abc import Callable
|
|
2
|
+
from collections.abc import Callable, Coroutine
|
|
3
3
|
from functools import wraps
|
|
4
|
-
from typing import Any, ParamSpec,
|
|
4
|
+
from typing import Any, ParamSpec, cast, get_type_hints, overload
|
|
5
5
|
|
|
6
|
-
from .
|
|
6
|
+
from ._core import FluxQueueCore
|
|
7
7
|
from .utils import get_task_name
|
|
8
8
|
|
|
9
9
|
P = ParamSpec("P")
|
|
10
|
-
TaskDecorator: TypeAlias = Callable[[Callable[P, Any]], Callable[P, Any]]
|
|
11
10
|
|
|
12
11
|
|
|
13
12
|
class FluxQueue:
|
|
@@ -30,7 +29,7 @@ class FluxQueue:
|
|
|
30
29
|
name: str | None = None,
|
|
31
30
|
queue: str = "default",
|
|
32
31
|
max_retries: int = 3,
|
|
33
|
-
)
|
|
32
|
+
):
|
|
34
33
|
"""
|
|
35
34
|
Mark a function as a FluxQueue task.
|
|
36
35
|
|
|
@@ -52,7 +51,23 @@ class FluxQueue:
|
|
|
52
51
|
before treating it as dead.
|
|
53
52
|
"""
|
|
54
53
|
|
|
55
|
-
|
|
54
|
+
@overload
|
|
55
|
+
def decorator(func: Callable[P, None]) -> Callable[P, None]: ...
|
|
56
|
+
|
|
57
|
+
@overload
|
|
58
|
+
def decorator(
|
|
59
|
+
func: Callable[P, Coroutine[Any, Any, None]],
|
|
60
|
+
) -> Callable[P, Coroutine[Any, Any, None]]: ...
|
|
61
|
+
|
|
62
|
+
def decorator(
|
|
63
|
+
func: Callable[P, None | Coroutine[Any, Any, None]],
|
|
64
|
+
) -> Callable[P, None | Coroutine[Any, Any, None]]:
|
|
65
|
+
type_hints = get_type_hints(func)
|
|
66
|
+
return_type = type_hints.get("return")
|
|
67
|
+
|
|
68
|
+
if return_type and return_type is not type(None):
|
|
69
|
+
raise TypeError(f"Task function must return None, got {return_type}")
|
|
70
|
+
|
|
56
71
|
is_async = inspect.iscoroutinefunction(func)
|
|
57
72
|
task_name = get_task_name(func, name)
|
|
58
73
|
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
name: "Build Python Package"
|
|
2
|
-
description: "Build and package the library"
|
|
3
|
-
inputs:
|
|
4
|
-
python-version:
|
|
5
|
-
description: "Python version"
|
|
6
|
-
required: true
|
|
7
|
-
|
|
8
|
-
runs:
|
|
9
|
-
using: composite
|
|
10
|
-
steps:
|
|
11
|
-
- uses: actions/checkout@v4
|
|
12
|
-
- uses: actions/setup-python@v5
|
|
13
|
-
with:
|
|
14
|
-
python-version: ${{ inputs.python-version }}
|
|
15
|
-
- name: Set target based on OS and arch
|
|
16
|
-
shell: bash
|
|
17
|
-
run: |
|
|
18
|
-
if [[ "${RUNNER_OS}" == "Linux" ]]; then
|
|
19
|
-
echo "TARGET=x86_64-unknown-linux-gnu" >> $GITHUB_ENV
|
|
20
|
-
elif [[ "${RUNNER_OS}" == "macOS" ]]; then
|
|
21
|
-
if [[ "${RUNNER_ARCH}" == "ARM64" ]]; then
|
|
22
|
-
echo "TARGET=aarch64-apple-darwin" >> $GITHUB_ENV
|
|
23
|
-
else
|
|
24
|
-
echo "TARGET=x86_64-apple-darwin" >> $GITHUB_ENV
|
|
25
|
-
fi
|
|
26
|
-
elif [[ "${RUNNER_OS}" == "Windows" ]]; then
|
|
27
|
-
echo "TARGET=x86_64-pc-windows-msvc" >> $GITHUB_ENV
|
|
28
|
-
fi
|
|
29
|
-
- name: Build wheels
|
|
30
|
-
uses: PyO3/maturin-action@v1
|
|
31
|
-
with:
|
|
32
|
-
target: ${{ env.TARGET }}
|
|
33
|
-
args: --release --out dist --find-interpreter
|
|
34
|
-
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
|
35
|
-
- name: Upload wheels
|
|
36
|
-
uses: actions/upload-artifact@v4
|
|
37
|
-
with:
|
|
38
|
-
name: wheels-${{ inputs.python-version }}-${{ env.TARGET }}
|
|
39
|
-
path: dist
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
name: "Build Worker"
|
|
2
|
-
description: "Build worker"
|
|
3
|
-
inputs:
|
|
4
|
-
python-version:
|
|
5
|
-
description: "Python version to use"
|
|
6
|
-
required: true
|
|
7
|
-
|
|
8
|
-
runs:
|
|
9
|
-
using: composite
|
|
10
|
-
steps:
|
|
11
|
-
- name: Checkout repository
|
|
12
|
-
uses: actions/checkout@v4
|
|
13
|
-
|
|
14
|
-
- name: Set target based on OS and arch
|
|
15
|
-
shell: bash
|
|
16
|
-
run: |
|
|
17
|
-
if [[ "${RUNNER_OS}" == "Linux" ]]; then
|
|
18
|
-
echo "TARGET=x86_64-unknown-linux-gnu" >> $GITHUB_ENV
|
|
19
|
-
elif [[ "${RUNNER_OS}" == "macOS" ]]; then
|
|
20
|
-
if [[ "${RUNNER_ARCH}" == "ARM64" ]]; then
|
|
21
|
-
echo "TARGET=aarch64-apple-darwin" >> $GITHUB_ENV
|
|
22
|
-
else
|
|
23
|
-
echo "TARGET=x86_64-apple-darwin" >> $GITHUB_ENV
|
|
24
|
-
fi
|
|
25
|
-
elif [[ "${RUNNER_OS}" == "Windows" ]]; then
|
|
26
|
-
echo "TARGET=x86_64-pc-windows-msvc" >> $GITHUB_ENV
|
|
27
|
-
fi
|
|
28
|
-
|
|
29
|
-
- name: Set up Python ${{ inputs.python-version }}
|
|
30
|
-
uses: actions/setup-python@v5
|
|
31
|
-
with:
|
|
32
|
-
python-version: ${{ inputs.python-version }}
|
|
33
|
-
|
|
34
|
-
- name: Install Rust
|
|
35
|
-
uses: dtolnay/rust-toolchain@stable
|
|
36
|
-
|
|
37
|
-
- name: Cache Rust
|
|
38
|
-
uses: Swatinem/rust-cache@v2
|
|
39
|
-
|
|
40
|
-
- name: Build
|
|
41
|
-
shell: bash -euxo pipefail {0}
|
|
42
|
-
run: scripts/build-worker.sh ${{ env.TARGET }}
|
|
43
|
-
|
|
44
|
-
- name: Package the worker (Linux)
|
|
45
|
-
if: runner.os == 'Linux'
|
|
46
|
-
shell: bash -euxo pipefail {0}
|
|
47
|
-
run: |
|
|
48
|
-
cd dist
|
|
49
|
-
mv fluxqueue-worker-${{ env.TARGET }} fluxqueue-worker
|
|
50
|
-
tar -czvf fluxqueue-${{ github.ref_name }}-py${{ inputs.python-version }}-linux-x86_64.tar.gz fluxqueue-worker
|
|
51
|
-
rm fluxqueue-worker
|
|
52
|
-
|
|
53
|
-
- name: Package the worker (macOS)
|
|
54
|
-
if: runner.os == 'macOS'
|
|
55
|
-
shell: bash -euxo pipefail {0}
|
|
56
|
-
run: |
|
|
57
|
-
cd dist
|
|
58
|
-
mv fluxqueue-worker-${{ env.TARGET }} fluxqueue-worker
|
|
59
|
-
zip fluxqueue-${{ github.ref_name }}-py${{ inputs.python-version }}-${{ env.TARGET }}.zip fluxqueue-worker
|
|
60
|
-
rm fluxqueue-worker
|
|
61
|
-
|
|
62
|
-
- name: Package the worker (Windows)
|
|
63
|
-
if: runner.os == 'Windows'
|
|
64
|
-
shell: pwsh
|
|
65
|
-
run: |
|
|
66
|
-
cd dist
|
|
67
|
-
mv fluxqueue-worker-${{ env.TARGET }}.exe fluxqueue-worker.exe
|
|
68
|
-
Compress-Archive -Path fluxqueue-worker.exe -DestinationPath fluxqueue-${{ github.ref_name }}-py${{ inputs.python-version }}-windows-x86_64.zip
|
|
69
|
-
rm fluxqueue-worker.exe
|
|
70
|
-
|
|
71
|
-
- name: Upload build artifact
|
|
72
|
-
uses: actions/upload-artifact@v4
|
|
73
|
-
with:
|
|
74
|
-
name: fluxqueue-worker-${{ env.TARGET }}-py${{ inputs.python-version }}
|
|
75
|
-
path: dist/*
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
name: "Run Python and Rust Tests"
|
|
2
|
-
description: "Standardized test suite with strict shell"
|
|
3
|
-
inputs:
|
|
4
|
-
python-version:
|
|
5
|
-
description: "Python version to use"
|
|
6
|
-
required: true
|
|
7
|
-
|
|
8
|
-
runs:
|
|
9
|
-
using: composite
|
|
10
|
-
steps:
|
|
11
|
-
- name: Set up Python ${{ inputs.python-version }}
|
|
12
|
-
uses: actions/setup-python@v5
|
|
13
|
-
with:
|
|
14
|
-
python-version: ${{ inputs.python-version }}
|
|
15
|
-
cache: pip
|
|
16
|
-
|
|
17
|
-
- name: Install dependencies
|
|
18
|
-
shell: bash -euxo pipefail {0}
|
|
19
|
-
run: |
|
|
20
|
-
python -m pip install --upgrade pip
|
|
21
|
-
pip install -e .[tests]
|
|
22
|
-
|
|
23
|
-
- name: Set up Rust
|
|
24
|
-
uses: dtolnay/rust-toolchain@stable
|
|
25
|
-
|
|
26
|
-
- name: Rust Cache
|
|
27
|
-
uses: Swatinem/rust-cache@v2
|
|
28
|
-
|
|
29
|
-
- name: Run Tests
|
|
30
|
-
shell: bash -euxo pipefail {0}
|
|
31
|
-
run: |
|
|
32
|
-
pytest tests/
|
|
33
|
-
cargo test --workspace --locked
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
name: Deploy Docs
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- main
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
deploy-docs:
|
|
10
|
-
if: (github.repository_owner == 'ccxlv')
|
|
11
|
-
runs-on: ubuntu-latest
|
|
12
|
-
|
|
13
|
-
steps:
|
|
14
|
-
- name: Checkout Repository
|
|
15
|
-
uses: actions/checkout@v4
|
|
16
|
-
|
|
17
|
-
- name: Setup Python3.13
|
|
18
|
-
uses: actions/setup-python@v5
|
|
19
|
-
with:
|
|
20
|
-
python-version: "3.13"
|
|
21
|
-
|
|
22
|
-
- name: Install Dependencies
|
|
23
|
-
run: pip install -e .[docs]
|
|
24
|
-
|
|
25
|
-
- name: Build Docs
|
|
26
|
-
run: mkdocs build
|
|
27
|
-
|
|
28
|
-
- name: Deploy Docs
|
|
29
|
-
uses: cloudflare/wrangler-action@v3
|
|
30
|
-
with:
|
|
31
|
-
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
32
|
-
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
|
|
33
|
-
command: pages deploy site/ --project-name=fluxqueue
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
# This file is autogenerated by maturin v1.10.2
|
|
2
|
-
# To update, run
|
|
3
|
-
#
|
|
4
|
-
# maturin generate-ci github
|
|
5
|
-
#
|
|
6
|
-
name: Publish to PyPI
|
|
7
|
-
|
|
8
|
-
on:
|
|
9
|
-
release:
|
|
10
|
-
types: [published]
|
|
11
|
-
|
|
12
|
-
permissions:
|
|
13
|
-
contents: read
|
|
14
|
-
|
|
15
|
-
jobs:
|
|
16
|
-
build:
|
|
17
|
-
if: github.repository_owner == 'ccxlv' && startsWith(github.event.release.tag_name, 'v')
|
|
18
|
-
name: ${{ matrix.os }} (Py ${{ matrix.python-version }})
|
|
19
|
-
strategy:
|
|
20
|
-
matrix:
|
|
21
|
-
os: [ubuntu-latest, macos-latest, macos-15-intel, windows-latest]
|
|
22
|
-
python-version: ["3.11", "3.12", "3.13", "3.14"]
|
|
23
|
-
runs-on: ${{ matrix.os }}
|
|
24
|
-
steps:
|
|
25
|
-
- uses: actions/checkout@v4
|
|
26
|
-
- name: Run Build Suite
|
|
27
|
-
uses: ./.github/actions/build-package
|
|
28
|
-
with:
|
|
29
|
-
python-version: ${{ matrix.python-version }}
|
|
30
|
-
|
|
31
|
-
sdist:
|
|
32
|
-
if: github.repository_owner == 'ccxlv' && startsWith(github.event.release.tag_name, 'v')
|
|
33
|
-
runs-on: ubuntu-latest
|
|
34
|
-
steps:
|
|
35
|
-
- uses: actions/checkout@v4
|
|
36
|
-
- name: Build sdist
|
|
37
|
-
uses: PyO3/maturin-action@v1
|
|
38
|
-
with:
|
|
39
|
-
command: sdist
|
|
40
|
-
args: --out dist
|
|
41
|
-
- name: Upload sdist
|
|
42
|
-
uses: actions/upload-artifact@v4
|
|
43
|
-
with:
|
|
44
|
-
name: wheels-sdist
|
|
45
|
-
path: dist
|
|
46
|
-
|
|
47
|
-
release:
|
|
48
|
-
if: github.repository_owner == 'ccxlv' && startsWith(github.event.release.tag_name, 'v')
|
|
49
|
-
name: Release
|
|
50
|
-
runs-on: ubuntu-latest
|
|
51
|
-
needs: [build, sdist]
|
|
52
|
-
permissions:
|
|
53
|
-
id-token: write
|
|
54
|
-
contents: write
|
|
55
|
-
attestations: write
|
|
56
|
-
steps:
|
|
57
|
-
- name: Install uv
|
|
58
|
-
uses: astral-sh/setup-uv@v7
|
|
59
|
-
- name: Download artifacts
|
|
60
|
-
uses: actions/download-artifact@v4
|
|
61
|
-
with:
|
|
62
|
-
path: dist
|
|
63
|
-
- name: Generate artifact attestation
|
|
64
|
-
uses: actions/attest-build-provenance@v2
|
|
65
|
-
with:
|
|
66
|
-
subject-path: "dist/**/*"
|
|
67
|
-
- name: Publish to PyPI
|
|
68
|
-
run: uv publish "dist/**/*"
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
name: Release Worker
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
tags:
|
|
6
|
-
- worker-v*
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
check-main:
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
steps:
|
|
12
|
-
- uses: actions/checkout@v6
|
|
13
|
-
with:
|
|
14
|
-
fetch-depth: 0
|
|
15
|
-
- name: Ensure tag is on main
|
|
16
|
-
run: |
|
|
17
|
-
git fetch origin main
|
|
18
|
-
git merge-base --is-ancestor "$GITHUB_SHA" origin/main
|
|
19
|
-
|
|
20
|
-
build:
|
|
21
|
-
if: github.repository_owner == 'ccxlv'
|
|
22
|
-
name: ${{ matrix.os }} (Py ${{ matrix.python-version }})
|
|
23
|
-
strategy:
|
|
24
|
-
matrix:
|
|
25
|
-
os: [ubuntu-latest, macos-latest, macos-15-intel, windows-latest]
|
|
26
|
-
python-version: ["3.11", "3.12", "3.13", "3.14"]
|
|
27
|
-
runs-on: ${{ matrix.os }}
|
|
28
|
-
steps:
|
|
29
|
-
- uses: actions/checkout@v4
|
|
30
|
-
- name: Run Build Suite
|
|
31
|
-
uses: ./.github/actions/build-worker
|
|
32
|
-
with:
|
|
33
|
-
python-version: ${{ matrix.python-version }}
|
|
34
|
-
|
|
35
|
-
release:
|
|
36
|
-
if: github.repository_owner == 'ccxlv'
|
|
37
|
-
needs: [build]
|
|
38
|
-
runs-on: ubuntu-latest
|
|
39
|
-
permissions:
|
|
40
|
-
contents: write
|
|
41
|
-
|
|
42
|
-
steps:
|
|
43
|
-
- name: Download artifacts
|
|
44
|
-
uses: actions/download-artifact@v4
|
|
45
|
-
with:
|
|
46
|
-
path: artifacts
|
|
47
|
-
|
|
48
|
-
- name: Create GitHub Release
|
|
49
|
-
uses: softprops/action-gh-release@v2
|
|
50
|
-
with:
|
|
51
|
-
tag_name: ${{ github.ref_name }}
|
|
52
|
-
name: ${{ github.ref_name }}
|
|
53
|
-
files: artifacts/**/*
|
|
54
|
-
draft: false
|
|
55
|
-
prerelease: false
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
name: Tests
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
pull_request:
|
|
5
|
-
branches:
|
|
6
|
-
- "**"
|
|
7
|
-
push:
|
|
8
|
-
branches:
|
|
9
|
-
- main
|
|
10
|
-
|
|
11
|
-
jobs:
|
|
12
|
-
# TODO: Add another job that will determine which tests to run based on push types and the changes that were made.
|
|
13
|
-
check-style:
|
|
14
|
-
runs-on: ubuntu-latest
|
|
15
|
-
steps:
|
|
16
|
-
- uses: actions/checkout@v4
|
|
17
|
-
- uses: dtolnay/rust-toolchain@stable
|
|
18
|
-
- uses: Swatinem/rust-cache@v2
|
|
19
|
-
- uses: pnpm/action-setup@v4
|
|
20
|
-
with:
|
|
21
|
-
version: 9
|
|
22
|
-
- uses: actions/setup-python@v5
|
|
23
|
-
with:
|
|
24
|
-
python-version: "3.13"
|
|
25
|
-
- run: |
|
|
26
|
-
pip install -e .[dev]
|
|
27
|
-
scripts/check-prettier.sh
|
|
28
|
-
ruff check .
|
|
29
|
-
cargo fmt --all -- --check
|
|
30
|
-
cargo clippy --workspace -- -D warnings
|
|
31
|
-
|
|
32
|
-
tests:
|
|
33
|
-
name: ${{ matrix.os }} (Py ${{ matrix.python-version }})
|
|
34
|
-
strategy:
|
|
35
|
-
fail-fast: false
|
|
36
|
-
matrix:
|
|
37
|
-
os: [ubuntu-latest, macos-latest, macos-15-intel]
|
|
38
|
-
python-version: ["3.11", "3.12", "3.13", "3.14"]
|
|
39
|
-
runs-on: ${{ matrix.os }}
|
|
40
|
-
steps:
|
|
41
|
-
- uses: actions/checkout@v4
|
|
42
|
-
|
|
43
|
-
- name: Install Redis (Linux)
|
|
44
|
-
if: runner.os == 'Linux'
|
|
45
|
-
shell: bash -euxo pipefail {0}
|
|
46
|
-
run: |
|
|
47
|
-
sudo apt-get update
|
|
48
|
-
sudo apt-get install -y redis-server
|
|
49
|
-
sudo systemctl start redis-server
|
|
50
|
-
|
|
51
|
-
- name: Install Redis (macOS)
|
|
52
|
-
if: runner.os == 'macOS'
|
|
53
|
-
shell: bash -euxo pipefail {0}
|
|
54
|
-
run: |
|
|
55
|
-
brew install redis
|
|
56
|
-
brew services start redis
|
|
57
|
-
|
|
58
|
-
- name: Run Test Suite
|
|
59
|
-
uses: ./.github/actions/tests
|
|
60
|
-
with:
|
|
61
|
-
python-version: ${{ matrix.python-version }}
|
|
62
|
-
|
|
63
|
-
tests-pass:
|
|
64
|
-
if: (github.repository_owner == 'ccxlv')
|
|
65
|
-
needs: [check-style, tests]
|
|
66
|
-
runs-on: ubuntu-latest
|
|
67
|
-
steps:
|
|
68
|
-
- run: echo "All tests passed ✅"
|
fluxqueue-0.2.0/.gitignore
DELETED
fluxqueue-0.2.0/Cargo.toml
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
[workspace]
|
|
2
|
-
members = ["crates/fluxqueue-common"]
|
|
3
|
-
|
|
4
|
-
[workspace.package]
|
|
5
|
-
repository = "https://github.com/CCXLV/fluxqueue"
|
|
6
|
-
homepage = "https://fluxqueue.ccxlv.dev"
|
|
7
|
-
authors = ["Giorgi Merebashvili <mereba2627@gmail.com>"]
|
|
8
|
-
edition = "2024"
|
|
9
|
-
|
|
10
|
-
[package]
|
|
11
|
-
name = "fluxqueue_core"
|
|
12
|
-
version = "0.2.0"
|
|
13
|
-
edition = "2024"
|
|
14
|
-
readme = "README.md"
|
|
15
|
-
|
|
16
|
-
[lib]
|
|
17
|
-
name = "fluxqueue_core"
|
|
18
|
-
crate-type = ["cdylib"]
|
|
19
|
-
|
|
20
|
-
[dependencies]
|
|
21
|
-
pyo3 = { version = "0.27.2", features = ["experimental-async"] }
|
|
22
|
-
pyo3-async-runtimes = { version = "0.27.0", features = ["tokio-runtime"] }
|
|
23
|
-
tokio = { version = "1.49.0", features = ["rt-multi-thread", "sync"] }
|
|
24
|
-
deadpool-redis = { version = "0.22.1", features = ["rt_tokio_1"] }
|
|
25
|
-
fluxqueue-common = { path = "./crates/fluxqueue-common" }
|
|
26
|
-
|
|
27
|
-
[workspace.dependencies]
|
|
28
|
-
fluxqueue-common = { path = "./crates/fluxqueue-common" }
|
fluxqueue-0.2.0/docs/about.md
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# Environment Variables (Worker)
|
|
2
|
-
|
|
3
|
-
These environment variables configure the worker and are equivalent to the CLI flags documented in the worker tutorial:
|
|
4
|
-
|
|
5
|
-
- `FLUXQUEUE_CONCURRENCY` – number of tasks processed in parallel.
|
|
6
|
-
- `FLUXQUEUE_REDIS_URL` – Redis connection URL.
|
|
7
|
-
- `FLUXQUEUE_TASKS_MODULE_PATH` – Python module path where tasks are exposed.
|
|
8
|
-
- `FLUXQUEUE_QUEUE` – queue name to listen on.
|
|
9
|
-
|
|
10
|
-
See the [**Worker**](../tutorial/worker.md) tutorial for detailed behavior and examples.
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# `FluxQueue` class
|
|
2
|
-
|
|
3
|
-
This page documents the main Python entry point for FluxQueue.
|
|
4
|
-
`FluxQueue` is the object you create in your app to enqueue work into Redis for the worker to process.
|
|
5
|
-
|
|
6
|
-
You can import the `FluxQueue` class from `fluxqueue`:
|
|
7
|
-
|
|
8
|
-
```python
|
|
9
|
-
from fluxqueue import FluxQueue
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
::: fluxqueue.FluxQueue
|
|
13
|
-
options:
|
|
14
|
-
members: - task
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
# API Reference
|
|
2
|
-
|
|
3
|
-
This section documents the public Python API exposed by FluxQueue.
|
|
4
|
-
It focuses on what is available (classes, methods, environment variables), not on step-by-step usage.
|
|
5
|
-
|
|
6
|
-
If you are looking for how to install and use FluxQueue in a project, start with the
|
|
7
|
-
[Installation](../tutorial/installation.md) and [Quick Start](../tutorial/quickstart.md) guides instead.
|