Skip to content

Commit 04df64d

Browse files
committed
Add run-worker wrapper script
1 parent 60baa8a commit 04df64d

4 files changed

Lines changed: 43 additions & 32 deletions

File tree

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.13.11

crates/fluxqueue-worker/Cargo.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ name = "fluxqueue-worker"
1212
path = "src/main.rs"
1313

1414
[dependencies]
15+
pyo3 = { version = "0.27.2", features = ["auto-initialize"] }
1516
pyo3-async-runtimes = { version = "0.27.0", features = ["tokio-runtime"] }
1617
uuid = { version = "1.20.0", features = ["v4"] }
1718
redis = "0.32.7"
@@ -22,12 +23,15 @@ tokio = { version = "1.49.0", features = [
2223
"signal",
2324
"time",
2425
] }
25-
pyo3 = { version = "0.27.2", features = ["auto-initialize"] }
2626
rmp-serde = "1.3.1"
2727
rmpv = { version = "1.3.1", features = ["with-serde"] }
2828
serde = { version = "1.0.228", features = ["derive"] }
2929
tracing = "0.1.44"
30-
tracing-subscriber = { version = "0.3.22", features = ["env-filter", "fmt", "time"] }
30+
tracing-subscriber = { version = "0.3.22", features = [
31+
"env-filter",
32+
"fmt",
33+
"time",
34+
] }
3135
time = { version = "0.3.47", features = ["local-offset", "macros"] }
3236
clap = { version = "4.5.56", features = ["derive", "env"] }
3337
anyhow = "1.0.100"

pyproject.toml

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,33 @@ dynamic = ["version"]
88
description = "A lightweight, resource-efficient, high-throughput task queue for Python, written in Rust."
99
readme = "README.md"
1010
requires-python = ">=3.11,<3.15"
11-
keywords = ["task-queue", "queue", "redis", "async", "background-tasks", "worker", "rust", "fluxqueue"]
11+
keywords = [
12+
"task-queue",
13+
"queue",
14+
"redis",
15+
"async",
16+
"background-tasks",
17+
"worker",
18+
"rust",
19+
"fluxqueue",
20+
]
1221
license = "Apache-2.0"
1322
license-files = ["LICENSE"]
14-
authors = [
15-
{name = "Giorgi Merebashvili", email = "mereba2627@gmail.com"}
16-
]
23+
authors = [{ name = "Giorgi Merebashvili", email = "mereba2627@gmail.com" }]
1724
classifiers = [
18-
"Development Status :: 5 - Production/Stable",
19-
"Intended Audience :: Developers",
20-
"Programming Language :: Python",
21-
"Programming Language :: Python :: 3",
22-
"Programming Language :: Python :: 3 :: Only",
23-
"Programming Language :: Python :: 3.11",
24-
"Programming Language :: Python :: 3.12",
25-
"Programming Language :: Python :: 3.13",
26-
"Programming Language :: Python :: 3.14",
27-
"Programming Language :: Rust",
28-
"Operating System :: OS Independent",
29-
"Topic :: Software Development :: Libraries",
30-
"Topic :: System :: Distributed Computing",
25+
"Development Status :: 5 - Production/Stable",
26+
"Intended Audience :: Developers",
27+
"Programming Language :: Python",
28+
"Programming Language :: Python :: 3",
29+
"Programming Language :: Python :: 3 :: Only",
30+
"Programming Language :: Python :: 3.11",
31+
"Programming Language :: Python :: 3.12",
32+
"Programming Language :: Python :: 3.13",
33+
"Programming Language :: Python :: 3.14",
34+
"Programming Language :: Rust",
35+
"Operating System :: OS Independent",
36+
"Topic :: Software Development :: Libraries",
37+
"Topic :: System :: Distributed Computing",
3138
]
3239

3340
[project.urls]
@@ -39,19 +46,9 @@ Changelog = "https://github.com/CCXLV/fluxqueue/releases"
3946

4047
[project.optional-dependencies]
4148
dev = ["ruff"]
42-
tests = [
43-
"pytest-asyncio",
44-
"python-dotenv",
45-
"redis"
46-
]
47-
cli = [
48-
"fluxqueue-cli>=0.1.0b4"
49-
]
50-
docs = [
51-
"mkdocs-material",
52-
"mkdocstrings",
53-
"mkdocstrings-python",
54-
]
49+
tests = ["pytest-asyncio", "python-dotenv", "redis"]
50+
cli = ["fluxqueue-cli>=0.1.0b4"]
51+
docs = ["mkdocs-material", "mkdocstrings", "mkdocstrings-python"]
5552
build = ["maturin"]
5653

5754
[tool.maturin]

scripts/run-worker.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
3+
LIB_DIR=$(python3 -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))")
4+
5+
if [ -n "$LIB_DIR" ]; then
6+
export LD_LIBRARY_PATH="$LIB_DIR:$LD_LIBRARY_PATH"
7+
fi
8+
9+
exec "./fluxqueue-worker" "$@"

0 commit comments

Comments
 (0)