5 Commits

Author SHA1 Message Date
Stan
5ff834b794 More str 2026-08-01 00:55:17 +02:00
Stan
2fe20033e3 more str 2026-07-31 23:25:25 +02:00
Stan
1537872bf2 use strings instead of integers/floats 2026-07-31 23:19:15 +02:00
Stan
c9020ce94e Merge branch 'master' into 334-fix-multiprocessor-forkserver-start-method 2026-07-15 17:27:59 +02:00
Stan
5597d7ccd8 update all dependencies to match current 2026-07-15 17:17:41 +02:00
6 changed files with 877 additions and 829 deletions

View File

@@ -27,34 +27,19 @@ jobs:
strategy:
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
django:
- "4.2"
- "5.0"
- "5.1"
- "5.2"
- "6.0"
exclude:
# django 5.2 does not support 3.9
- python-version: "3.9"
django: "5.2"
# django 5.1 does not support 3.9
- python-version: "3.9"
django: "5.1"
# django 5.0 does not support 3.9
- python-version: "3.9"
django: "5.0"
# django 4.2 does not support 3.13
- python-version: "3.13"
django: "4.2"
# django 6.0 does not support earlier than 3.12
- python-version: "3.9"
django: "6.0"
# django 6 does not support 3.10
- python-version: "3.10"
django: "6.0"
# django 6 does not support 3.11
- python-version: "3.11"
django: "6.0"

View File

@@ -1,5 +1,5 @@
# Sets the python version
FROM python:3.9-slim-bookworm
FROM python:3.12-slim-bookworm
# Allows the logs generated by python apps to be rendered in the terminal
ENV PYTHONUNBUFFERED 1

View File

@@ -35,13 +35,13 @@ See the `changelog <https://github.com/GDay/django-q2/blob/master/CHANGELOG.md>`
Requirements
~~~~~~~~~~~~
- `Django <https://www.djangoproject.com>`__ > = 4.2
- `Django <https://www.djangoproject.com>`__ 5.2 and 6.0
- `Django-picklefield <https://github.com/gintas/django-picklefield>`__
Tested with:
* Python 3.9 to 3.13.
* Django 4.2 to 6.0.
* Python 3.10 to 3.14.
* Django 5.2 and 6.0.
Brokers
~~~~~~~

View File

@@ -97,6 +97,8 @@ def monitor(run_once=False, broker=None):
for stat in stats:
status = stat.status
# color status
if stat.status == Conf.STARTING:
status = term.yellow(str(Conf.STARTING))
if stat.status == Conf.WORKING:
status = term.green(str(Conf.WORKING))
elif stat.status == Conf.STOPPING:
@@ -105,6 +107,8 @@ def monitor(run_once=False, broker=None):
status = term.red(str(Conf.STOPPED))
elif stat.status == Conf.IDLE:
status = str(Conf.IDLE)
else:
status = _("Unknown")
# color q's
tasks = str(stat.task_q_size)
if stat.task_q_size > 0:
@@ -138,7 +142,7 @@ def monitor(run_once=False, broker=None):
)
print(
term.move(i, 3 * col_width)
+ term.center(workers, width=col_width - 1)
+ term.center(str(workers), width=col_width - 1)
)
print(
term.move(i, 4 * col_width)
@@ -146,11 +150,11 @@ def monitor(run_once=False, broker=None):
)
print(
term.move(i, 5 * col_width)
+ term.center(results, width=col_width - 1)
+ term.center(str(results), width=col_width - 1)
)
print(
term.move(i, 6 * col_width)
+ term.center(stat.reincarnations, width=col_width - 1)
+ term.center(str(stat.reincarnations), width=col_width - 1)
)
print(
term.move(i, 7 * col_width)
@@ -411,27 +415,27 @@ def memory(run_once=False, workers=False, broker=None):
)
print(
term.move(row, 2 * col_width)
+ term.center(memory_available_percentage, width=col_width - 1)
+ term.center(str(memory_available_percentage), width=col_width - 1)
)
print(
term.move(row, 3 * col_width)
+ term.center(memory_available, width=col_width - 1)
+ term.center(str(memory_available), width=col_width - 1)
)
print(
term.move(row, 4 * col_width)
+ term.center(
round(psutil.virtual_memory().total / 1024**2, 2),
str(round(psutil.virtual_memory().total / 1024**2, 2)),
width=col_width - 1,
)
)
print(
term.move(row, 5 * col_width)
+ term.center(get_process_mb(stat.sentinel), width=col_width - 1)
+ term.center(str(get_process_mb(stat.sentinel)), width=col_width - 1)
)
print(
term.move(row, 6 * col_width)
+ term.center(
get_process_mb(getattr(stat, "monitor", None)),
str(get_process_mb(getattr(stat, "monitor", None))),
width=col_width - 1,
)
)
@@ -444,7 +448,7 @@ def memory(run_once=False, workers=False, broker=None):
print(
term.move(row, 7 * col_width)
+ term.center(
workers_mb or "NO_PROCESSES_FOUND", width=col_width - 1
str(workers_mb) or "NO_PROCESSES_FOUND", width=col_width - 1
)
)
row += 1
@@ -476,7 +480,7 @@ def memory(run_once=False, workers=False, broker=None):
mb_used = get_process_mb(worker_pid)
print(
term.move(row, (idx + 1) * col_width)
+ term.center(mb_used, width=col_width - 1)
+ term.center(str(mb_used), width=col_width - 1)
)
row += 1
row += 1

1647
poetry.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -52,8 +52,8 @@ include = [
[tool.poetry.dependencies]
python = ">=3.9,<4"
django = ">=4.2"
python = ">=3.10,<4"
django = ">=5.2"
django-picklefield = "^3.1"
blessed = { version = "^1.19.1", optional = true }